[Solved]Trunk with Lync

Get help with installing and running AsteriskNOW.

Moderators: Moderator, Support

[Solved]Trunk with Lync

Postby luffywallis » Tue Jun 19, 2012 1:21 am

Hi,
i have an asteriskNow server running, and i tried to connect it with a lync server for sip calls.
so i have configured my asterisk manually without webGUi; and those are the modifications:
* sip_additional.conf:
Code: Select all
[Lync_Trunk] ; Our Lync trunk
type=friend
port=5068             ; This is the default Lync Server Mediation TCP listening port
host=192.168.xx.35; This should be the IP address of your Lync Server
dtmfmode=rfc2833
context=from-lync
qualify=yes
transport=tcp,udp
insecure=invite


* extensions_additional.conf
Code: Select all
[from-lync]

;Tous les numés à chiffres commençt par 2 vers les extensions Asterisk locales
exten=>_2XX,1,Dial(SIP/${EXTEN},20)
exten=>_2XX,n,hangup()


[from-internal-additional]
include => from-internal-additional-custom
include => app-recordings
include => app-calltrace
include => app-directory
include => app-echo-test
include => app-speakextennum
include => app-speakingclock
include => app-dialvm
include => app-vmmain
include => app-userlogonoff
include => ext-local-confirm
include => findmefollow-ringallv2
include => app-pickup
include => app-zapbarge
include => app-chanspy
include => ext-test
include => ext-local
include => outbound-allroutes
;Tous les numeros a 3 chiffres commencant par 1 vers le Trunk SIP Lync
exten=>_1XX,1,Dial(SIP/Lync_Trunk/${EXTEN},20)
exten=>_1XX,n,hangup()
exten => h,1,Hangup


when i tried to call a lync extension from an asterisk extension, i had this message on the asterisk CLI:

Code: Select all
== Using SIP RTP CoS mark 5
    -- Executing [111@from-internal:1] Dial("SIP/222-00000000", "SIP/Lync_Trunk/111,20") in new stack
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [111@from-internal:2] Hangup("SIP/222-00000000", "") in new stack
  == Spawn extension (from-internal, 111, 2) exited non-zero on 'SIP/222-00000000'
    -- Executing [h@from-internal:1] Hangup("SIP/222-00000000", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/222-00000000'


when I do a show peer i have this:
Code: Select all
asterisk*CLI> sip show peers
Name/username              Host                                    Dyn Forcerport ACL Port     Status
222/222                    192.168.xx.51                            D              A  59212    OK (126 ms)
223                        (Unspecified)                            D              A  0        UNKNOWN
224/224                    192.168.xx.24                            D              A  5070     UNREACHABLE
Lync_Trunk                 192.168.xx.35                                N             5068     UNREACHABLE
4 sip peers [Monitored: 1 online, 3 offline Unmonitored: 0 online, 0 offline]



i can call from an asterisk extension to another asterisk extension, and from a Lync extension to another Lync extension... and when i call an asterisk extension from the lync extension, nothing happens on the asterisk side (no line added on the CLI)..what i need to know is: is my asterisk conf for this trunk good? thanks!
Last edited by luffywallis on Wed Jun 20, 2012 9:41 am, edited 1 time in total.
luffywallis
Newsterisk
 
Posts: 17
Joined: Tue May 22, 2012 5:47 am

Re: Trunk with Lync

Postby luffywallis » Tue Jun 19, 2012 7:13 am

And when trying with a config using the webGui, i have this output:
Code: Select all
== Using SIP RTP CoS mark 5
    -- Executing [111@from-internal:1] Macro("SIP/224-00000005", "user-callerid,LIMIT,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/224-00000005", "AMPUSER=224") in new stack
    -- Executing [s@macro-user-callerid:2] GotoIf("SIP/224-00000005", "0?report") in new stack
    -- Executing [s@macro-user-callerid:3] ExecIf("SIP/224-00000005", "1?Set(REALCALLERIDNUM=224)") in new stack
    -- Executing [s@macro-user-callerid:4] Set("SIP/224-00000005", "AMPUSER=224") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SIP/224-00000005", "AMPUSERCIDNAME=test") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("SIP/224-00000005", "0?report") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SIP/224-00000005", "AMPUSERCID=224") in new stack
    -- Executing [s@macro-user-callerid:8] Set("SIP/224-00000005", "CALLERID(all)="test" <224>") in new stack
    -- Executing [s@macro-user-callerid:9] GotoIf("SIP/224-00000005", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:10] ExecIf("SIP/224-00000005", "1?Set(GROUP(concurrency_limit)=224)") in new stack
    -- Executing [s@macro-user-callerid:11] GotoIf("SIP/224-00000005", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,24)
    -- Executing [s@macro-user-callerid:24] Set("SIP/224-00000005", "CALLERID(number)=224") in new stack
    -- Executing [s@macro-user-callerid:25] Set("SIP/224-00000005", "CALLERID(name)=test") in new stack
    -- Executing [s@macro-user-callerid:26] Set("SIP/224-00000005", "CHANNEL(language)=en") in new stack
    -- Executing [111@from-internal:2] Set("SIP/224-00000005", "MOHCLASS=default") in new stack
    -- Executing [111@from-internal:3] Set("SIP/224-00000005", "_NODEST=") in new stack
    -- Executing [111@from-internal:4] Gosub("SIP/224-00000005", "sub-record-check,s,1(out,111,)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("SIP/224-00000005", "1?check") in new stack
    -- Goto (sub-record-check,s,3)
    -- Executing [s@sub-record-check:3] Set("SIP/224-00000005", "MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:4] GotoIf("SIP/224-00000005", "1?next") in new stack
    -- Goto (sub-record-check,s,7)
    -- Executing [s@sub-record-check:7] ExecIf("SIP/224-00000005", "0?Return()") in new stack
    -- Executing [s@sub-record-check:8] GotoIf("SIP/224-00000005", "0?out,1") in new stack
    -- Executing [s@sub-record-check:9] Set("SIP/224-00000005", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:10] ExecIf("SIP/224-00000005", "0?Set(__REC_POLICY_MODE=)") in new stack
    -- Executing [s@sub-record-check:11] Set("SIP/224-00000005", "NOW=1340107933") in new stack
    -- Executing [s@sub-record-check:12] Set("SIP/224-00000005", "__DAY=19") in new stack
    -- Executing [s@sub-record-check:13] Set("SIP/224-00000005", "__MONTH=06") in new stack
    -- Executing [s@sub-record-check:14] Set("SIP/224-00000005", "__YEAR=2012") in new stack
    -- Executing [s@sub-record-check:15] Set("SIP/224-00000005", "__TIMESTR=20120619-141213") in new stack
    -- Executing [s@sub-record-check:16] Set("SIP/224-00000005", "__FROMEXTEN=224") in new stack
    -- Executing [s@sub-record-check:17] Set("SIP/224-00000005", "__CALLFILENAME=out-111-224-20120619-141213-1340107933.5") in new stack
    -- Executing [s@sub-record-check:18] Goto("SIP/224-00000005", "out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] ExecIf("SIP/224-00000005", "1?Set(__REC_POLICY_MODE=dontcare)") in new stack
    -- Executing [out@sub-record-check:2] GosubIf("SIP/224-00000005", "0?record,1(exten,111,224)") in new stack
    -- Executing [out@sub-record-check:3] Return("SIP/224-00000005", "") in new stack
    -- Executing [111@from-internal:5] Macro("SIP/224-00000005", "dialout-trunk,2,111,") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("SIP/224-00000005", "DIAL_TRUNK=2") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/224-00000005", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/224-00000005", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("SIP/224-00000005", "DIAL_NUMBER=111") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("SIP/224-00000005", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("SIP/224-00000005", "OUTBOUND_GROUP=OUT_2") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/224-00000005", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/224-00000005", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("SIP/224-00000005", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("SIP/224-00000005", "outbound-callerid,2") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/224-00000005", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/224-00000005", "0?Set(REALCALLERIDNUM=224)") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/224-00000005", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [s@macro-outbound-callerid:6] Set("SIP/224-00000005", "USEROUTCID=test") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("SIP/224-00000005", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("SIP/224-00000005", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/224-00000005", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,12)
    -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/224-00000005", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/224-00000005", "1?Set(CALLERID(all)=test)") in new stack
    -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/224-00000005", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/224-00000005", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [s@macro-dialout-trunk:12] GosubIf("SIP/224-00000005", "0?sub-flp-2,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("SIP/224-00000005", "OUTNUM=111") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("SIP/224-00000005", "custom=SIP/Lync_Trunk2") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/224-00000005", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("SIP/224-00000005", "0?Set(DIAL_TRUNK_OPTIONS=M(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("SIP/224-00000005", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/224-00000005", "") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/224-00000005", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("SIP/224-00000005", "1?Set(CONNECTEDLINE(num,i)=111)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("SIP/224-00000005", "1?Set(CONNECTEDLINE(name,i)=CID:)") in new stack
    -- Executing [s@macro-dialout-trunk:21] GotoIf("SIP/224-00000005", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:22] Dial("SIP/224-00000005", "SIP/Lync_Trunk2/111,300,") in new stack
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-dialout-trunk:23] NoOp("SIP/224-00000005", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 20") in new stack
    -- Executing [s@macro-dialout-trunk:24] Goto("SIP/224-00000005", "s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("SIP/224-00000005", "RC=20") in new stack
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("SIP/224-00000005", "20,1") in new stack
    -- Goto (macro-dialout-trunk,20,1)
    -- Executing [20@macro-dialout-trunk:1] Goto("SIP/224-00000005", "continue,1") in new stack
    -- Goto (macro-dialout-trunk,continue,1)
    -- Executing [continue@macro-dialout-trunk:1] GotoIf("SIP/224-00000005", "1?noreport") in new stack
    -- Goto (macro-dialout-trunk,continue,3)
    -- Executing [continue@macro-dialout-trunk:3] NoOp("SIP/224-00000005", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 20 - failing through to other trunks") in new stack
    -- Executing [continue@macro-dialout-trunk:4] Set("SIP/224-00000005", "CALLERID(number)=224") in new stack
    -- Executing [111@from-internal:6] Macro("SIP/224-00000005", "outisbusy,") in new stack
    -- Executing [s@macro-outisbusy:1] Progress("SIP/224-00000005", "") in new stack
    -- Executing [s@macro-outisbusy:2] Playback("SIP/224-00000005", "all-circuits-busy-now,noanswer") in new stack
    -- <SIP/224-00000005> Playing 'all-circuits-busy-now.gsm' (language 'en')
    -- Executing [s@macro-outisbusy:3] Playback("SIP/224-00000005", "pls-try-call-later,noanswer") in new stack
    -- <SIP/224-00000005> Playing 'pls-try-call-later.gsm' (language 'en')
    -- Executing [s@macro-outisbusy:4] Macro("SIP/224-00000005", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("SIP/224-00000005", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] Hangup("SIP/224-00000005", "") in new stack
  == Spawn extension (macro-hangupcall, s, 3) exited non-zero on 'SIP/224-00000005' in macro 'hangupcall'
  == Spawn extension (macro-outisbusy, s, 4) exited non-zero on 'SIP/224-00000005' in macro 'outisbusy'
  == Spawn extension (from-internal, 111, 6) exited non-zero on 'SIP/224-00000005'
    -- Executing [h@from-internal:1] Hangup("SIP/224-00000005", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/224-00000005'
luffywallis
Newsterisk
 
Posts: 17
Joined: Tue May 22, 2012 5:47 am

Re: Trunk with Lync

Postby luffywallis » Wed Jun 20, 2012 2:49 am

Can anyone please tell me the meaning of this message:

Code: Select all
== Everyone is busy/congested at this time (1:0/0/1)



i'm running out of ideas guys; and i am stuck on this problem for two days, so any kind of help will be really really great :cry:

P.S: i installed X-lite and connected it successfully to Asterisk, so i think it's not a firewall issue:

Code: Select all
asterisk*CLI> sip show peers
Name/username              Host                                    Dyn Forcerport ACL Port     Status
222                        (Unspecified)                            D              A  0        UNKNOWN
223/223                    192.168.xx.35                            D              A  47044    OK (108 ms)
224/224                    192.168.yy.24                            D              A  5070     OK (3 ms)
Lync_Trunk2                192.168.xx.35                                              5068     UNREACHABLE
luffywallis
Newsterisk
 
Posts: 17
Joined: Tue May 22, 2012 5:47 am

Re: Trunk with Lync

Postby david55 » Wed Jun 20, 2012 4:38 am

It means all 1 devices specified as candidate destinations in your Dial application call were unable to accept the call. In this case all one of them fell into the third category, which is unavailable. There should be a primary error message about this slightly earlier in the log. (Note that dial can take a list of candidate devices, all of which will be rung at once, although only the first to answer will be used.)

Unavailable means that: the channel driver isn't load, you are referencing a non-existent section in the channel specific configuration file, a dynamically connected device is currently registered (looks like your case), or, in some cases, that the remote side returned some sort of number unavailable indication.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

[Solved]Trunk with Lync

Postby luffywallis » Wed Jun 20, 2012 9:40 am

thank you for your response David.
it actually was a port issue (on the centos firewall of the asterisk server on tcp port 5060)
for more details, see http://social.technet.microsoft.com/For ... 934a88c592
luffywallis
Newsterisk
 
Posts: 17
Joined: Tue May 22, 2012 5:47 am


Return to AsteriskNOW Support

Who is online

Users browsing this forum: Yahoo [Bot] and 5 guests