Modifying INVITE header to add phone-context

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Modifying INVITE header to add phone-context

Julian Yap
I have a PSTN gateway which requires a Phone-Context value in the
outgoing SIP INVITE message to further apply ISDN NPI/TON details.

Here's an example of what I currently have going out to the PSTN gateway:
INVITE sip:[hidden email]:5060;user=phone SIP/2.0.

This is what I require:
INVITE sip:[hidden email]:5060;phone-context=sip.server.com;user=phone
SIP/2.0.

Any clues on how to add the Phone-Context value?

Thanks,
Julian

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Modifying INVITE header to add phone-context

Julian Yap
I pretty much solved the issue.

This is what I used:
subst_uri('/^sip:([0-9]+)@(.*)$/sip:\1@\2;phone-context=sip.server.com/i


On Tue, Apr 7, 2009 at 4:25 PM, Julian Yap <[hidden email]> wrote:

> I have a PSTN gateway which requires a Phone-Context value in the
> outgoing SIP INVITE message to further apply ISDN NPI/TON details.
>
> Here's an example of what I currently have going out to the PSTN gateway:
> INVITE sip:[hidden email]:5060;user=phone SIP/2.0.
>
> This is what I require:
> INVITE sip:[hidden email]:5060;phone-context=sip.server.com;user=phone
> SIP/2.0.
>
> Any clues on how to add the Phone-Context value?
>
> Thanks,
> Julian
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Modifying INVITE header to add phone-context

Bogdan-Andrei Iancu
Hi Julian,

a much nicer option is the add_uri_param() function from URI module:
    http://www.opensips.org/html/docs/modules/devel/uri.html#id228164

Regards,
Bogdan

Julian Yap wrote:

> I pretty much solved the issue.
>
> This is what I used:
> subst_uri('/^sip:([0-9]+)@(.*)$/sip:\1@\2;phone-context=sip.server.com/i
>
>
> On Tue, Apr 7, 2009 at 4:25 PM, Julian Yap <[hidden email]> wrote:
>  
>> I have a PSTN gateway which requires a Phone-Context value in the
>> outgoing SIP INVITE message to further apply ISDN NPI/TON details.
>>
>> Here's an example of what I currently have going out to the PSTN gateway:
>> INVITE sip:[hidden email]:5060;user=phone SIP/2.0.
>>
>> This is what I require:
>> INVITE sip:[hidden email]:5060;phone-context=sip.server.com;user=phone
>> SIP/2.0.
>>
>> Any clues on how to add the Phone-Context value?
>>
>> Thanks,
>> Julian
>>
>>    
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users