[OpenSIPS-Users] Modify Invite

Brett Nemeroff brett at nemeroff.com
Sun May 2 01:17:48 CEST 2010


How about adding:
if (!is_avp_set("$avp(s:lrn)")) {
     $avp(s:lrn)="";
}

To prevent the null value from causing problems...


On Sat, May 1, 2010 at 5:27 PM, Laszlo <laszlo at voipfreak.net> wrote:

>
>
> 2010/4/30 Brad Bendy <brad.bendy at benganetworks.com>
>
>  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;
>>
>>
> maybe
> that should go out if $avp(s:lrn) is not null(otherwise you should see
> errors in the syslog/messages).
> can you post the output of
> ngrep '11235559999'  port 5060 -Wbyline -q -dany -t
>
> ?
> Is there any other place where you manipulate $ru? (failure_route or
> somewhere else)
>
> -Laszlo
>
>
>
>
>
>
>
>
>>  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.
>>
>>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100501/cd988886/attachment.htm 


More information about the Users mailing list