Hello,
First of all, thank you all guys for providing such a good support. I really appreciate your help.
The problem i´m facing is that i want to call to 2 users using the same extension, just one call. Apparently it´s something simple, but the problem happens if one of those users is unavailable. In this case, the call does not progress even for the user connected.
This is a bit more complex since i have all data stored in a mysql database, but i think this is not the issue.
All the users belong to the same context, and the fields of the “extension” table of the database are as follows:
- priority: 1
- app: dial
- appdata: {PJSIP_DIAL_CONTACTS(user1)}&{PJSIP_DIAL_CONTACTS(user2)}
Note that I use the function PJSIP_DIAL_CONTACTS because i want to call all endpoints associated to each user. It can be more than one.
When both users are available, i can see the Dial function in the Asterisk console, all endpoints in the dialplan are properly handled:
Dial(“PJSIP/userX-00000026”, “PJSIP/user1/sip:a2d8qbkp@212.170.49.127:45834;transport=ws&PJSIP/user2/sip:flhjvsvu@212.170.49.127:62263;transport=ws”)
In this case the call progress succesfully.
But if user2 is unavailable, the console log of Asterisk shows the following:
Executing [49501568619667@default:1] Dial(“PJSIP/userX-00000029”, “PJSIP/user1/sip:flhjvsvu@212.170.49.127:62263;transport=ws&”)
WARNING[5306][C-0000001a]: app_dial.c:2449 dial_exec_full: Dial argument takes format (technology/resource)
== Spawn extension (default, 49501568619667, 1) exited non-zero on ‘PJSIP/userX-00000029’
Looking at the debug traces, the Dial function argument ends up with a weird and lonely &. Next to that & the user2´s endpoint should be inserted, but since user2 is unavailable there is nothing to add there. And the result is a call failure. No call to user1 happens.
Could you please let me know if i´m using a wrong format for the appdata field to queue different users, or if i should use a different function (different from PJSIP_DIAL_CONTACTS I mean). Or maybe there is some configuration flag for this.
Thanks a lot in advanced.
Cheers.
BTW: I´m using Asterisk 16, and all the data is stored in a mysql database.