[asterisk-users] Set variables from one asterisk ta a second.

Olivier CALVANO o.calvano at gmail.com
Sun Apr 15 14:49:59 CDT 2012


Ok,

the CLI of the server one :

    -- Executing [06xxxx at Unlimited-outgoing:3]
Dial("SIP/USRSIP000005-0a7a52e8",
"IAX2/Srv2/06xxxx/USRSIP000005,180,rt") in new stack
    -- Called Trader/06xxxx/USRSIP000005


The CLI of the server two:

srv2*CLI>
    -- Accepting AUTHENTICATED call from 172.20.8.1:
       > requested format = alaw,
       > requested prefs = (alaw|g729),
       > actual format = alaw,
       > host prefs = (alaw|g729),
       > priority = mine
[Apr 15 21:46:26] ERROR[31094]: pbx.c:2860 ast_func_read: Function
$CALLERID not registered
    -- Executing [0xxxx at Appels-Sortants:1] Verbose("IAX2/VoIP-953",
"passed ID ") in new stack
passed ID
[Apr 15 21:46:26] ERROR[31094]: pbx.c:2860 ast_func_read: Function
$CALLERID not registered
    -- Executing [0xxxx at Appels-Sortants:2] AGI("IAX2/VoIP-953",
"MyScript.agi,") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/MyScript.agi
    -- <IAX2/VoIP-953>AGI Script MyScript.agi completed, returning 0
    -- Executing [0xxxx at Appels-Sortants:3] Dial("IAX2/VoIP-953",
"SIP/Telco/33xxxx,180,rt") in new stack
  == Using SIP RTP CoS mark 5
    -- Called Telco/336xxxx
  == Spawn extension (Appels-Sortants, 06xxxx, 3) exited non-zero on
'IAX2/VoIP-953'
    -- Hungup 'IAX2/VoIP-953'
srv2*CLI>







Le 15 avril 2012 21:39, Danny Nicholas <danny at debsinc.com> a écrit :
> Change this
> exten => _x,2,AGI(MyScript.agi,${$CALLERID(num){0:4}})
> to this
> exten => _x,2,Verbose(passed ID ${$CALLERID(num)})
> exten => _x,3,AGI(MyScript.agi,${$CALLERID(num){0:4}})
>
> and post your CLI output.  We need to see if the OP's suggestion is getting
> to Asterisk #2.
>
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Olivier
> CALVANO
> Sent: Sunday, April 15, 2012 2:29 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] Set variables from one asterisk ta a second.
>
> i am search on google ;=) but no result for this moment hihi
>
>
>
>
> Le 15 avril 2012 21:14, Olivier CALVANO <o.calvano at gmail.com> a écrit :
>> Very thanks for your help, but no, it's not good
>>
>>
>> Le 15 avril 2012 20:54, Danny Nicholas <danny at debsinc.com> a écrit :
>>> I believe they were trying to say
>>> exten => _x,2,AGI(MyScript.agi,${$CALLERID(num){0:4}})
>>>
>>>
>>> -----Original Message-----
>>> From: asterisk-users-bounces at lists.digium.com
>>> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Olivier
>>> CALVANO
>>> Sent: Sunday, April 15, 2012 1:52 PM
>>> To: Asterisk Users Mailing List - Non-Commercial Discussion
>>> Subject: Re: [asterisk-users] Set variables from one asterisk ta a
> second.
>>>
>>> Hi
>>>
>>> Thanks for your help but i don't know this variable: $CALLID[1-4]
>>>
>>>
>>> it's correct:
>>>
>>>        exten => _x,2,AGI(MyScript.agi,${$CALLID[1-4]})
>>>
>>> ?
>>>
>>> best regards
>>> olivier
>>>
>>>
>>>
>>>
>>> Le 15 avril 2012 12:55, Administrator TOOTAI <admin at tootai.net> a écrit :
>>>> Le 15/04/2012 10:44, Olivier CALVANO a écrit :
>>>>
>>>>> Hi
>>>>>
>>>>> actually, i have a asterisk server with all SIP Account.
>>>>>
>>>>> this Asterisk server sent all outgoing call to a second Asterisk
>>>>> server (and this asterisk sent to the
>>>>> telco)
>>>>>
>>>>> On the first Asterisk, i use:
>>>>>
>>>>>         exten =>  _x,1,Set(CDR(CodeTier)=BUS-FRAMOBI)
>>>>>         exten =>  _x,2,Set(CALLERID(num)=${CALLERIDNUM})
>>>>>         exten =>  _x,3,Dial(IAX2/Srv2/${EXTEN},180,rt)
>>>>>         exten =>  _x,4,Hangup
>>>>>
>>>>>
>>>>> i have SIP user: USRSIP001
>>>>> (user sip is in realtime)
>>>>> he use this name with a password
>>>>>
>>>>> i want that the first server sent to the second into a variable the
>>>>> "USRSIP001"
>>>>> for get it into a AGI script.
>>>>>
>>>>> It's possible ?
>>>>
>>>>
>>>> exten =>  _x,3,Dial(IAX2/Srv2/${EXTEN}/USRSIP001,180,rt)
>>>>
>>>> you should get the value in $CALLID[1-4] on the second server.
>>>>
>>>> --
>>>> Daniel
>>>>
>>>> --
>>>> ____________________________________________________________________
>>>> _
>>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com
>>>> -- New to Asterisk? Join us for a live introductory webinar every Thurs:
>>>>              http://www.asterisk.org/hello
>>>>
>>>> asterisk-users mailing list
>>>> To UNSUBSCRIBE or update options visit:
>>>>  http://lists.digium.com/mailman/listinfo/asterisk-users
>>>
>>> --
>>> _____________________________________________________________________
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>>               http://www.asterisk.org/hello
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>>
>>>
>>> --
>>> _____________________________________________________________________
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>>               http://www.asterisk.org/hello
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
> Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list