SIP URI Set ‘telephone-context=’

Home » Asterisk Users » SIP URI Set ‘telephone-context=’
Asterisk Users 6 Comments

Hi all, I am currently using asterisk 11, and I am trying to figure out how to set the uri parameter telephone-context. I need to set it for outbound calls for a specific carrier when making emergency calls and don’t seem able to find the option to set it.

Regards Impy aka Mick

6 thoughts on - SIP URI Set ‘telephone-context=’

  • Are you using res_pjsip or chan_sip?

    For PJSIP, it’s as easy as passing the parameters to the Dial. For example:
    Dial(PJSIP/${ARG1}\;phone-context=mydomain.com@pjsippeer,60)

    I am pretty sure it was easy in chan_sip, too. If you are using chan_sip, I’ll try and find an example.

  • I kinda have it working with chan_sip.

    Dial(SIP/+${EXTEN}\;phone-context=+44@10.10.10.10;user=phone)
    But it doesn’t include the user=phone at the end when dialling out.

    “To: “.

    even adding usereqphone=yes to the sip.conf doesn’t add the user=phone to the end unless I remove the the sip uri stuff out of the dial string.

    Ideally I would like it to look like this INVITE sip:118099;phone-context=+44@10.10.10.10:5060;user=phone Or INVITE sip: 118099@10.10.10.10:5060; user=phone; phone-context=+44

    It doesn’t matter which way I do it I can only include one extra parameter and not the two (user=phone;phone-context) as Asterisk ignores the second one.

  • That’s because in the Asterisk dialplan, a semicolon is used to denote a comment (on account of the comment mark being a valid DTMF digit). So you will have to insert a backslash before the semicolon before user=phone .

  • Agree. All you have to do is:

    Dial(SIP/+${EXTEN}\;phone-context=+44@10.10.10.10\;user=phone)

    I am actually surprised that the dialplan reload would work without it…

  • I swear I tested it like that and it didn’t work. But its working now so thanks guys for your help.