[asterisk-users] PJSIP_DIAL_CONTACTS issue
Richard Mudgett
rmudgett at digium.com
Wed Jul 20 10:55:45 CDT 2016
On Wed, Jul 20, 2016 at 9:58 AM, Faheem Muhammad <faheem2084 at gmail.com>
wrote:
> Hi,
> I'm facing a strange dialplan issue with a PJSIP_DIAL_CONTACTS.
>
> When I try to call an offline endpoint with PJSIP_DIAL_CONTACTS, the dial
> command breaks and the call control go to hangup block instead of next
> priority. The error in CLI says "*Dial requires an argument
> (technology/resource)*".
> This error seems legit as there are no contacts for an offline endpoint.
> The dialplan should jump to the next priority.
>
> exten => 1001,1,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})})
> exten => 1001,2,,NoOP(${DIALSTATUS})
> exten => 1001,3,Dial(PJSIP/mytrunk/sip:${mob}@10.0.0.1)
>
> exten => h,1,NoOp()
> exten => h,n,NoOP(${DIALSTATUS})
>
> -----------------------------------------------------------------------
> If i try to dial the same offline endpoint with the below code snippet, it
> jumps to next prirorty.
> exten => 1001,1,Dial(PJSIP/${EXTEN})
> exten => 1001,2,,NoOP(${DIALSTATUS})
> exten => 1001,3,Dial(PJSIP/mytrunk/sip:${mob}@10.0.0.1)
>
> exten => h,1,NoOp()
> exten => h,n,NoOP(${DIALSTATUS})
>
> The endpoint may register from multiple device, so I always have to dial
> it all contacts. Did anyone else face such problem?
>
You need to examine if the returned dial string is empty in your dialplan.
PJSIP_DIAL_CONTACTS returns
an '&' separated list of available contacts. If there are no contacts the
list is empty. Dial doesn't like an
empty list.
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160720/576c70d6/attachment.html>
More information about the asterisk-users
mailing list