[OpenSIPS-Users] Modify Invite
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Mon May 3 11:33:28 CEST 2010
Hi Brad,
so printing the $ru after the changes (with xlog) shows the right value,
but in the outgoing INVITE you do not see that value ?? If so, maybe
you have a second change on RURI that is changing your change :).
try placing xlogs for $ru in different location in the code between your
change and the t_relay() to see if the $ru gets changes on the way.
Regards,
Bogdan
Brad Bendy wrote:
> Hi,
>
> Im bringing this back up again.
>
> Ive had to switch our INVITE format as some upstreams parse the INVITE
> differently, I just need to change the order of variables around.
>
> Now the weird thing is, I set the $ru and then when I check to see
> what $ru is set to, it's been set correct, the order and all variables
> are correct, but then openSIPs sends the INVITE out it fails to modify
> it at all.
>
> I was using:
> $ru='sip:' + $rU + '@' + $rd + ';npdi=yes' + ';rn=' + $avp(s:lrn);
>
> now
> $ru='sip:' + $rU + ';npdi=yes' + ';rn=+1' + $avp(s:lrn) + '@' + $rd;
>
> Before the INVITE would look like:
>
> INVITE sip:+11235559999*@1.1.1.1*;npdi=yes;rn=+11235559999 SIP/2.0
>
> but now it should look like INVITE
> sip:+11235559999;npdi=yes;rn=+11235559999*@1.1.1.1* SIP/2.0
>
> it currently looks like INVITE sip:+11235559999@*1.1.1.1* SIP/2.0.
>
> Any ideals why just the positions of the AVPs and the other text would
> matter? I think it's weird when I use xlog() to print what $ru is set
> to it shows the correct value just OpenSIPs does not modify the
> INVITE. Not sure if anyone else has ran into this on the list or not.
>
> Thanks!
>
>
> On Mon, 2010-02-22 at 13:21 -0700, Brad Bendy wrote:
>> I just did:
>> $ru='sip:' + $rU + '@' + $rd + ';npdi=yes' + ';rn=' + $avp(s:lrn);
>>
>> That works like a champ, thanks for help on this, rewriting the ru
>> direct took care of it!
>>
>> Thanks again
>>
>> On Mon, 2010-02-22 at 18:24 +0200, Bogdan-Andrei Iancu wrote:
>>> Brad,
>>>
>>> the function does not support variables as parameters :(.
>>>
>>> But a simple workaround, if you want to add a parameter to the RURI is:
>>> $ru = $ru + ";rn=" + $avp(s:foo) ;
>>>
>>> Regards,
>>> Bogdan
>>>
>>> Brad Bendy wrote:
>>> > Hi Bogdan,
>>> >
>>> > I just tried the add_uri_param() but when a avp since I need to pass a
>>> > dynamic value to it, and it errors out with a syntax error. If I try
>>> > with double quotes around the avp it then literally displays
>>> > "$avp(s:foo)" when it adds to the URI.
>>> >
>>> > Something im missing?
>>> >
>>> > Thanks
>>> >
>>> > On Mon, 2010-02-22 at 10:45 +0200, Bogdan-Andrei Iancu wrote:
>>> >> Hi Brad,
>>> >>
>>> >> Maybe http://www.opensips.org/html/docs/modules/1.6.x/uri.html#id270649 ?
>>> >>
>>> >> Regards,
>>> >> Bogdan
>>> >>
>>> >> Brad Bendy wrote:
>>> >> > Hi list,
>>> >> >
>>> >> > I need to add npdi=yes;rn=xxxxxxxxxx when I send a INVITE out. Ive
>>> >> > looked and don't really see any way to do this exactly. Is their a
>>> >> > module im missing to do this, or some sort of method? I thought this
>>> >> > would be in textops maybe but I do not see it in that module either.
>>> >> >
>>> >> > Any help or pointers would be great.
>>> >> >
>>> >> > Thanks!
>>> >> > ------------------------------------------------------------------------
>>> >> >
--
Bogdan-Andrei Iancu
www.voice-system.ro
More information about the Users
mailing list