[asterisk-users] Configuring SIP Trunk

Sathyan M m.sathyan at ymail.com
Fri May 8 08:01:39 CDT 2009


Hi All,

I have searched the various post and not able to find the solution.

I am using Asterisk 1.4.21.2 for outgoing calls. Earlier i used ZAP trunk and it works fine. Now i need to move to SIP trunk and configured the same.

When i try from softphone i got error as "Call rejected" and in the asterisk i got error as 

*****************************************************************************************************

    -- Executing [90012127773456 at from-internal:1] Macro("SIP/2022-083c53f0", "user-callerid|SKIPTTL|") in new stack
    -- Executing [s at macro-user-callerid:1] NoOp("SIP/2022-083c53f0", "user-callerid: device 2022") in new stack
    -- Executing [s at macro-user-callerid:2] Set("SIP/2022-083c53f0", "AMPUSER=2022") in new stack
    -- Executing [s at macro-user-callerid:3] GotoIf("SIP/2022-083c53f0", "0?report") in new stack
    -- Executing [s at macro-user-callerid:4] ExecIf("SIP/2022-083c53f0", "1|Set|REALCALLERIDNUM=2022") in new stack
    -- Executing [s at macro-user-callerid:5] NoOp("SIP/2022-083c53f0", "REALCALLERIDNUM is 2022") in new stack
    -- Executing [s at macro-user-callerid:6] Set("SIP/2022-083c53f0", "AMPUSER=2022") in new stack
    -- Executing [s at macro-user-callerid:7] Set("SIP/2022-083c53f0", "AMPUSERCIDNAME=EXTs1") in new stack
    -- Executing [s at macro-user-callerid:8] GotoIf("SIP/2022-083c53f0", "0?report") in new stack
    -- Executing [s at macro-user-callerid:9] Set("SIP/2022-083c53f0", "AMPUSERCID=2022") in new stack
    -- Executing [s at macro-user-callerid:10] Set("SIP/2022-083c53f0", "CALLERID(all)="EXTs1" <2022>") in new stack
    -- Executing [s at macro-user-callerid:11] Set("SIP/2022-083c53f0", "REALCALLERIDNUM=2022") in new stack
    -- Executing [s at macro-user-callerid:12] ExecIf("SIP/2022-083c53f0", "0|Set|CHANNEL(language)=") in new stack
    -- Executing [s at macro-user-callerid:13] NoOp("SIP/2022-083c53f0", "TTL:  ARG1: SKIPTTL") in new stack
    -- Executing [s at macro-user-callerid:14] GotoIf("SIP/2022-083c53f0", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,23)
    -- Executing [s at macro-user-callerid:23] NoOp("SIP/2022-083c53f0", "Using CallerID "EXTs1" <2022>") in new stack
    -- Executing [90012127773456 at from-internal:2] Set("SIP/2022-083c53f0", "_NODEST=") in new stack
    -- Executing [90012127773456 at from-internal:3] Macro("SIP/2022-083c53f0", "record-enable|2022|OUT|") in new stack
    -- Executing [s at macro-record-enable:1] GotoIf("SIP/2022-083c53f0", "0?2:4") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing [s at macro-record-enable:4] AGI("SIP/2022-083c53f0", "recordingcheck|20090508-171018|1241782818.40") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
  recordingcheck|20090508-171018|1241782818.40: Outbound recording not enabled
    -- AGI Script recordingcheck completed, returning 0
    -- Executing [s at macro-record-enable:5] NoOp("SIP/2022-083c53f0", "No recording needed") in new stack
    -- Executing [90012127773456 at from-internal:4] Macro("SIP/2022-083c53f0", "dialout-trunk|2|0012127773456||") in new stack
    -- Executing [s at macro-dialout-trunk:1] Set("SIP/2022-083c53f0", "DIAL_TRUNK=2") in new stack
    -- Executing [s at macro-dialout-trunk:2] ExecIf("SIP/2022-083c53f0", "0|Authenticate|") in new stack
    -- Executing [s at macro-dialout-trunk:3] GotoIf("SIP/2022-083c53f0", "0?disabletrunk|1") in new stack
    -- Executing [s at macro-dialout-trunk:4] Set("SIP/2022-083c53f0", "DIAL_NUMBER=0012127773456") in new stack
    -- Executing [s at macro-dialout-trunk:5] Set("SIP/2022-083c53f0", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s at macro-dialout-trunk:6] Set("SIP/2022-083c53f0", "GROUP()=OUT_2") in new stack
    -- Executing [s at macro-dialout-trunk:7] GotoIf("SIP/2022-083c53f0", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s at macro-dialout-trunk:9] GotoIf("SIP/2022-083c53f0", "0?skipoutcid") in new stack
    -- Executing [s at macro-dialout-trunk:10] Set("SIP/2022-083c53f0", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [s at macro-dialout-trunk:11] Macro("SIP/2022-083c53f0", "outbound-callerid|2") in new stack
    -- Executing [s at macro-outbound-callerid:1] ExecIf("SIP/2022-083c53f0", "0|SetCallerPres|") in new stack
    -- Executing [s at macro-outbound-callerid:2] GotoIf("SIP/2022-083c53f0", "1?start") in new stack
    -- Goto (macro-outbound-callerid,s,4)
    -- Executing [s at macro-outbound-callerid:4] NoOp("SIP/2022-083c53f0", "REALCALLERIDNUM is 2022") in new stack
    -- Executing [s at macro-outbound-callerid:5] GotoIf("SIP/2022-083c53f0", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,10)
    -- Executing [s at macro-outbound-callerid:10] Set("SIP/2022-083c53f0", "USEROUTCID=") in new stack
    -- Executing [s at macro-outbound-callerid:11] Set("SIP/2022-083c53f0", "EMERGENCYCID=") in new stack
    -- Executing [s at macro-outbound-callerid:12] Set("SIP/2022-083c53f0", "TRUNKOUTCID=") in new stack
    -- Executing [s at macro-outbound-callerid:13] GotoIf("SIP/2022-083c53f0", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,17)
    -- Executing [s at macro-outbound-callerid:17] GotoIf("SIP/2022-083c53f0", "1?usercid") in new stack
    -- Goto (macro-outbound-callerid,s,19)
    -- Executing [s at macro-outbound-callerid:19] GotoIf("SIP/2022-083c53f0", "1?report") in new stack
    -- Goto (macro-outbound-callerid,s,23)
    -- Executing [s at macro-outbound-callerid:23] NoOp("SIP/2022-083c53f0", "CallerID set to "EXTs1" <2022>") in new stack
    -- Executing [s at macro-dialout-trunk:12] AGI("SIP/2022-083c53f0", "fixlocalprefix") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
    -- AGI Script fixlocalprefix completed, returning 0
    -- Executing [s at macro-dialout-trunk:13] Set("SIP/2022-083c53f0", "OUTNUM=0012127773456") in new stack
    -- Executing [s at macro-dialout-trunk:14] Set("SIP/2022-083c53f0", "custom=SIP/New") in new stack
    -- Executing [s at macro-dialout-trunk:15] GotoIf("SIP/2022-083c53f0", "1?gocall") in new stack
    -- Goto (macro-dialout-trunk,s,17)
    -- Executing [s at macro-dialout-trunk:17] Macro("SIP/2022-083c53f0", "dialout-trunk-predial-hook|") in new stack
    -- Executing [s at macro-dialout-trunk:18] GotoIf("SIP/2022-083c53f0", "0?bypass|1[0    ;37;40m") in new stack
    -- Executing [s at macro-dialout-trunk:19] GotoIf("SIP/2022-083c53f0", "0?customtrunk") in new stack
    -- Executing [s at macro-dialout-trunk:20] Dial("SIP/2022-083c53f0", "SIP/New/0012127773456|300|") in new stack
    -- Couldn't call New/0012127773456
  == Everyone is busy/congested at this time (0:0/0/0)
    -- Executing [s at macro-dialout-trunk:21] Goto("SIP/2022-083c53f0", "s-CHANUNAVAIL|1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL at macro-dialout-trunk:1] GotoIf("SIP/2022-083c53f0", "1?noreport") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,3)
    -- Executing [s-CHANUNAVAIL at macro-dialout-trunk:3] NoOp("SIP/2022-083c53f0", "TRUNK Dial failed due to CHANUNAVAIL - failing through to other trunks") in new stack
    -- Executing [90012127773456 at from-internal:5] Macro("SIP/2022-083c53f0", "outisbusy|") in new stack
    -- Executing [s at macro-outisbusy:1] Playback("SIP/2022-083c53f0", "all-circuits-busy-now|noanswer") in new stack
    -- <SIP/2022-083c53f0> Playing 'all-circuits-busy-now' (language 'en')
    -- Executing [s at macro-outisbusy:2] Playback("SIP/2022-083c53f0", "pls-try-call-later|noanswer") in new stack
    -- <SIP/2022-083c53f0> Playing 'pls-try-call-later' (language 'en')
    -- Executing [s at macro-outisbusy:3] Macro("SIP/2022-083c53f0", "hangupcall") in new stack
    -- Executing [s at macro-hangupcall:1] ResetCDR("SIP/2022-083c53f0", "w") in new stack
    -- Executing [s at macro-hangupcall:2] NoCDR("SIP/2022-083c53f0", "") in new stack
    -- Executing [s at macro-hangupcall:3] GotoIf("SIP/2022-083c53f0", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,6)
    -- Executing [s at macro-hangupcall:6] GotoIf("SIP/2022-083c53f0", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s at macro-hangupcall:9] GotoIf("SIP/2022-083c53f0", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,11)
    -- Executing [s at macro-hangupcall:11] Hangup("SIP/2022-083c53f0", "") in new stack
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/2022-083c53f0' in macro 'hangupcall'
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/2022-083c53f0' in macro 'outisbusy'
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/2022-083c53f0'

****************************************************************************************************

vi sip_additional.conf
===============
[2022]
type=peer
secret=2022
record_out=Adhoc
record_in=Adhoc
qualify=yes
port=5060
pickupgroup=
nat=no
mailbox=2022 at device
host=dynamic
dtmfmode=rfc2833
dial=SIP/2022
context=from-internal
canreinvite=no
callgroup=
callerid=device <2022>
accountcode=
call-limit=50

[New]
allow=ulaw
allow=alaw
allow=gsm
canreinvite=yes
context=from-trunk
disallow=all
dtmf=auto
dtmfmode=rfc2833
outboundproxy=203.196.128.56
progressinbound=yes
host=xxx.xxx.xxx.xxx
qualify=300
insecure=port,invite
secret=xxxxxx
type=peer
username=XXXXX
nat=yes
externip=xxx.xxx.xxx.xxx
localnet=192.168.10.0/255.255.255.0

vi sip_registrations.conf
=================
register=XXXXX:xxxxx at xxx.xxx.xxx.xxx

Sip registered to the sip provider.

When i checked with service provide they informed that they get userid append with some other digit like "42634XXXXX". But where as no where i have configured "42634".

Let me know where do i done the mistake.



      Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090508/7c8ae314/attachment.htm 


More information about the asterisk-users mailing list