[OpenSIPS-Users] Replace From Field

Iulian Macare iulian.macare at gmail.com
Fri Mar 2 23:53:52 CET 2012


I have solved this .. now it authenticates.. the problem is that calls
are not established ....  It stays like bellow and it gives in the end
Request Timeout . Can it be due to cseq limitation?

INVITE sip:059545413 at 192.168.4.250 SIP/2.0
Record-Route: <sip:192.168.4.250;lr=on;ftag=a2421324;did=5bd.61453da7;vsf=AAAAAAoAcAF5AxcDGAkYCh4aGAQ1MA-->
Via: SIP/2.0/UDP 192.168.4.250;branch=z9hG4bK9ed4.aa345c52.0
Via: SIP/2.0/UDP
192.168.20.66:30714;received=192.168.20.66;branch=z9hG4bK-d8754z-6125d472ea5ddf5b-1---d8754z-;rport=30714
Max-Forwards: 69
Contact: <sip:9000 at 192.168.20.66:30714>
To: "059545413"<sip:059545413 at 192.168.4.250>
From: "9000"<sip:30 at 192.168.20.66>;tag=a2421324
Call-ID: ZTc4NmQ2NGNkMDllZDMyZDI3ZmRhZjkxY2U2ZDljNjM.
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO
Content-Type: application/sdp
Content-Length: 420


Ignoring this INVITE request
<--- SIP read from 192.168.4.250:5060 --->
INVITE sip:059545413 at 192.168.4.250 SIP/2.0
Record-Route: <sip:192.168.4.250;lr=on;ftag=da42cb79;did=cec.f1edf3b5>
Record-Route: <sip:192.168.4.250;lr=on;ftag=da42cb79;did=cec.e1edf3b5;vsf=AAAAAAoAcAF5AxcDGAkYCh4aGAQ1MA-->
Via: SIP/2.0/UDP 192.168.4.250;branch=z9hG4bK02de.af806845.0
Via: SIP/2.0/UDP 192.168.4.250;branch=z9hG4bK02de.9f806845.1
Via: SIP/2.0/UDP
192.168.20.66:30714;received=192.168.20.66;branch=z9hG4bK-d8754z-33588c5a3017375b-1---d8754z-;rport=30714
Max-Forwards: 68
Contact: <sip:9000 at 192.168.20.66:30714>
To: "059545413"<sip:059545413 at 192.168.4.250>
From: "9000"<sip:30 at 192.168.20.66>;tag=da42cb79
Call-ID: ZmI5Y2NlODIzYTUyNGEzZTkyMmJmZmJkMTBiZjc5Y2Y.
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO
Content-Type: application/sdp
Content-Length: 420
Proxy-Authorization: Digest username="30", realm="asterisk",
nonce="002a73e0", uri="sip:059545413 at 192.168.4.250",
response="86b0f446f0d0d17d41db4c7791f41f4e", algorithm=MD5


On Fri, Mar 2, 2012 at 11:14 PM, Vlad Paiu <vladpaiu at opensips.org> wrote:
> Hello,
>
> The uac_replace_from() just modifies the FROM header, is does not touch the
> Authorization header or any other header.
>
> Regards,
>
> Vlad Paiu
> OpenSIPS Developer
> http://www.opensips-solutions.com
>
>
> Pe 3/2/2012 10:13 PM, Iulian Macare a scris:
>>
>> Hello
>>
>> My setup is the following:
>>
>>
>> Serveral asterisk boxes (let's name them asteriskG) that register and
>> send calls to opensips that balance the outbound calls to other 3 x
>> asterisk servers (let's name them asteriskO) that  futher sends the
>> calls to my SIP ITSP. ( I have 3 ITSP , each one connected to a
>> asteriskO )
>>
>> So by having this setup , I can balance the calls generated by
>> asteriskG to my 3 ITSP providers.
>>
>>
>> What I would like to do is to get rid of the 3 asteriskO server that I
>> use to connect to the ITSP and use MediaProxy for rtp relay.
>>
>> In order to do this I must replace the from field that contains my
>> internal usernames&passwords that asteriskG connect to opensips with
>> the username&password that my ITSP require
>>
>> I have tried doing this with uac_replace_from but I keep get SIP/2.0
>> 403 Forbidden
>>
>>
>> What I have found is the following:
>>
>> Let's say that asteriskG ( 192.168.20.66 ) connects to opensips (
>> 192.168.4.250 ) with user 9000 and the user for ITSP ( 192.168.4.26 )
>> is 30
>>
>> I tried the following: uac_replace_from("30","sip:30 at 192.168.4.250");
>> and the sip log is:
>>
>> INVITE sip:05954543 at 192.168.4.26 SIP/2.0
>>
>> Record-Route:<sip:192.168.4.250;lr=on;ftag=ca42eb7f;vsf=AAAAAAoAcAF5AxcDGAkYDAAGGwI1MA-->
>> Via: SIP/2.0/UDP 192.168.4.250;branch=z9hG4bK58a2.12e355c3.0
>> Via: SIP/2.0/UDP
>>
>> 192.168.20.66:26838;received=192.168.20.66;branch=z9hG4bK-d8754z-2f50b813447d8503-1---d8754z-;rport=26838
>> Max-Forwards: 69
>> Contact:<sip:9000 at 192.168.20.66:26838>
>> To: "05954543"<sip:05954543 at 192.168.4.250>
>> From: "30"<sip:30 at 192.168.4.250>;tag=ca42eb7f
>> Call-ID: OWNiODdiNTBiNTdiOWIxMDUxZDQwNzkwZTg4MjdjOGE.
>> CSeq: 4 INVITE
>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
>> SUBSCRIBE, INFO
>> Content-Type: application/sdp
>> Proxy-Authorization: Digest
>>
>> username="9000",realm="asterisk",nonce="2fe5b437",uri="sip:05954543 at 192.168.4.250",response="38d11bf7db043a643500a74dfb29b933",algorithm=MD5
>> Content-Length: 420
>>
>>
>> Sending to 192.168.4.250 : 5060 (NAT)
>> Using INVITE request as basis request -
>> OWNiODdiNTBiNTdiOWIxMDUxZDQwNzkwZTg4MjdjOGE.
>> Found user '30'
>> <--- Reliably Transmitting (NAT) to 192.168.4.250:5060 --->
>> SIP/2.0 403 Forbidden
>> Via: SIP/2.0/UDP
>> 192.168.4.250;branch=z9hG4bK58a2.12e355c3.0;received=192.168.4.250
>> Via: SIP/2.0/UDP
>>
>> 192.168.20.66:26838;received=192.168.20.66;branch=z9hG4bK-d8754z-2f50b813447d8503-1---d8754z-;rport=26838
>> From: "30"<sip:30 at 192.168.4.250>;tag=ca42eb7f
>> To: "05954543"<sip:05954543 at 192.168.4.250>;tag=as388b4f7b
>> Call-ID: OWNiODdiNTBiNTdiOWIxMDUxZDQwNzkwZTg4MjdjOGE.
>> CSeq: 4 INVITE
>> User-Agent: Asterisk PBX
>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
>> Supported: replaces
>> Content-Length: 0
>>
>>
>>
>>
>> Why do I get forbidden ? why in Proxy-Authorization: Digest username
>> is still 9000 ?
>>
>> If I set user 30 on AsteriskG ( 192.168.20.66 ) works fine ....I use
>> opensips 1.6.4
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list