VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
faheem2084 at gmail.com Guest
|
Posted: Wed Jul 20, 2016 9:59 am Post subject: [asterisk-users] PJSIP_DIAL_CONTACTS issue |
|
|
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?
Thanks!
Faheem |
|
Back to top |
|
|
rmudgett at digium.com Guest
|
Posted: Wed Jul 20, 2016 10:57 am Post subject: [asterisk-users] PJSIP_DIAL_CONTACTS issue |
|
|
On Wed, Jul 20, 2016 at 9:58 AM, Faheem Muhammad <faheem2084@gmail.com (faheem2084@gmail.com)> wrote:
Quote: | 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 |
|
Back to top |
|
|
cursor at telecomabmex... Guest
|
Posted: Wed Jul 20, 2016 10:58 am Post subject: [asterisk-users] PJSIP_DIAL_CONTACTS issue |
|
|
On 7/20/16 9:58 AM, Faheem Muhammad wrote:
Quote: | 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?
| My solution to this problem was to use a gotoif and check if PJSIP_DIAL_CONTACTS has any contacts before trying to dial, if it does not then I skip the dial and goto the next step. So:
exten => 1001,1,GotoIf($["${PJSIP_DIAL_CONTACTS(${EXTEN})}" = ""]?nocon)
exten => 1001,n,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})})
exten => 1001,n(nocon),SomethingElse
Quote: | --
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez
+52 (55)9116-91161 |
|
|
Back to top |
|
|
faheem2084 at gmail.com Guest
|
Posted: Wed Jul 20, 2016 11:54 am Post subject: [asterisk-users] PJSIP_DIAL_CONTACTS issue |
|
|
Thanks Richord and Carlos.
On Wednesday, 20 July 2016, Carlos Chavez <cursor@telecomabmex.com (cursor@telecomabmex.com)> wrote:
Quote: |
On 7/20/16 9:58 AM, Faheem Muhammad wrote:
Quote: | 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?
| My solution to this problem was to use a gotoif and check if PJSIP_DIAL_CONTACTS has any contacts before trying to dial, if it does not then I skip the dial and goto the next step. So:
exten => 1001,1,GotoIf($["${PJSIP_DIAL_CONTACTS(${EXTEN})}" = ""]?nocon)
exten => 1001,n,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})})
exten => 1001,n(nocon),SomethingElse
Quote: | --
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez
+52 (55)9116-91161 |
|
--
Sent from Gmail Mobile |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|