[Freeswitch-users] Dial string issue for multiple registrations contact

Piccinin Francesco francesco.piccinin at insiel.it
Mon Sep 26 10:29:31 UTC 2022


hello to everyone,  I'm taking my first steps on this wonderful software!
I have a little problem:

in a lua script I'm forging a dialstring like this:
{option1=value1, option2=value2}[presence_id=1001 at domainA]${sofia_contact(user/1001 at domainA)},[presence_id=1002 at domainA]${sofia_contact(user/1002 at domainA)}

suppose that users have both 2 active registrations, the desired dialstring should be:
{option1=value1, option2=value2}[presence_id=1001 at domainA]sofia/internal/sip:1001 at 10.10.10.1,[presence_id=1001 at domainA]sofia/internal/sip:1001 at 10.10.10.2,[presence_id=1002 at domainA]sofia/internal/sip:1002 at 10.10.10.3,[presence_id=1002 at domainA]sofia/internal/sip:1002 at 10.10.10.4

Since {sofia_contact(user/1001 at domainA)} is expanded in a list of comma separated values, what I get is: (spaces for readeability):
{option1=value1, option2=value2}[presence_id=1001 at domainA]sofia/internal/sip:1001 at 10.10.10.1,sofia/internal/sip:1001 at 10.10.10.2,[presence_id=1002 at domainA]sofia/internal/sip:1002 at 10.10.10.3,sofia/internal/sip:1002 at 10.10.10.4

so, only one registration per extensions gets the presence_id parameter.

I also tried to manipulate the sintax adding parenthesis but it was not accpeted and errors returned.

Is it a way to achieve the desired dialstring?many thanks!


Francesco

AVVISO DI RISERVATEZZA Informazioni riservate possono essere contenute nel messaggio o nei suoi allegati. Se non siete i destinatari indicati nel messaggio, o responsabili per la sua consegna alla persona, o se avete ricevuto il messaggio per errore, siete pregati di non trascriverlo, copiarlo o inviarlo ad alcuno. In tal caso vi invitiamo a cancellare il messaggio ed i suoi allegati. Grazie.
CONFIDENTIALITY NOTICE Confidential information may be contained in this message or in its attachments. If you are not the addressee indicated in this message, or responsible for message delivering to that person, or if you have received this message in error, you may not transcribe, copy or deliver this message to anyone. In that case, you should delete this message and its attachments. Thank you.



More information about the FreeSWITCH-users mailing list