[asterisk-dev] How to send DNIS(B-party number) in IAX trunk
Sam Liang
samliang at isphone.com.au
Tue Jul 18 21:53:04 MST 2006
Hi,
I am a voip engineer in a Sydney company,
We got a problem when we want to set up multiple IAX trunks.
We set up the trunk from PortSIP to IAX2 trunk fine. But when the customer
set up a Asterisk trunk to our Asterisk server, which hopefully relay
multiple call from PortaSIP into our Asterisk and then to the customer
Asterisk server by the specific trunk. We get a problem. Our PortaSIP send
out the DID into Asterisk, Asterisk grasp the DID with AGI function, but
when the call go further into customer premise Asterisk DID, Our Asterisk
just bridge the call to the customer's IAX2 trunk, but failed to pass the
DID number further,
That means our customer can only create a single number trunk with our
Asterisk, instead of what we want to achieve for the read PABX, multiple DID
route inside a single IAX2 trunk.
I will like to enclose the Asterisk log here as well, the ITSP_Asterisk log
contain the log information when a call make to the premium with DID_NUM
61282138622, and the customer_side_Asterisk.log contain the concurrent log
of the customer premium Asterisk log.
Our Asterisk use Asterisk realtime engine 1.2.1
Customer use Asterisk at Home 2.8 which is 1.2.7
Best regards,
Sam Liang
Support Network Engineer
ISPhone Australasia Pty Ltd
Tel: +61 (0)2 8213 8686
Fax: +61 (0)2 8213 8685
Mob: 0413509414
email: samliang at isphone.com.au
web: www.isphone.com.au
-------------- next part --------------
----- /* Begin receive call from 203.166.103.233 with caller ID '0413509414' to '61282138622' */ ----------
Jul 19 14:37:14 DEBUG[3225]: chan_iax2.c:7127 socket_read: Peer lastms 15, historicms 15, maxms 2000
Jul 19 14:37:22 DEBUG[3226]: res_config_mysql.c:125 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM sip_buddies WHERE name = '0413509414'
Jul 19 14:37:22 DEBUG[3226]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
Jul 19 14:37:22 DEBUG[3226]: chan_sip.c:7096 check_user_full: Setting NAT on RTP to 0
Jul 19 14:37:22 DEBUG[3226]: chan_sip.c:10322 handle_request_invite: Checking SIP call limits for device
Jul 19 14:37:22 DEBUG[3226]: res_config_mysql.c:125 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM extensions_table WHERE exten = '61282138622' AND context = 'on-net' AND priority = '1'
Jul 19 14:37:22 DEBUG[3226]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
-----/* trace out the real time extension with 61282138622 is actually the trunk 'IAX2/10027' */ --------
Jul 19 14:37:22 DEBUG[3226]: chan_sip.c:6025 build_route: build_route: Contact hop: Anonymous <sip:203.166.103.233:5061>
Jul 19 14:37:22 DEBUG[3217]: res_config_mysql.c:125 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM sip_buddies WHERE name = '203.166.103.230'
Jul 19 14:37:22 DEBUG[1153]: res_config_mysql.c:125 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM extensions_table WHERE exten = '61282138622' AND context = 'on-net' AND priority = '1'
Jul 19 14:37:22 DEBUG[3217]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
Jul 19 14:37:22 DEBUG[1153]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
Jul 19 14:37:22 DEBUG[1153]: res_config_mysql.c:125 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM extensions_table WHERE exten = '61282138622' AND context = 'on-net' AND priority = '1'
Jul 19 14:37:22 DEBUG[1153]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
Jul 19 14:37:22 DEBUG[1153]: res_config_mysql.c:125 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM extensions_table WHERE exten = '61282138622' AND context = 'on-net' AND priority = '1'
Jul 19 14:37:22 DEBUG[1153]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
Jul 19 14:37:22 DEBUG[1153]: res_config_mysql.c:125 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM extensions_table WHERE exten = '61282138622' AND context = 'on-net' AND priority = '1'
Jul 19 14:37:22 DEBUG[1153]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
----/* bridge the inbound call invite from SIP/203.166.103.230-b7b016a0 into IAX2/10027, which is a IAX2 trunk to our customer */ -----
-- Executing Dial("SIP/203.166.103.230-b7b016a0", "IAX2/10027")
-- Called 10027
Jul 19 14:37:22 DEBUG[1153]: res_config_mysql.c:125 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM extensions_table WHERE exten = '61282138622' AND context = 'on-net' AND priority = '-1'
Jul 19 14:37:22 DEBUG[1153]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
Jul 19 14:37:22 DEBUG[1153]: res_config_mysql.c:237 realtime_multi_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM extensions_table WHERE exten LIKE '\_%' AND context = 'on-net' AND priority = '-1' ORDER BY exten
Jul 19 14:37:22 DEBUG[1153]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
-------/* After negotiate the codec, remote customer 58.107.154.6 receive the call and rang the extensions */ ------
-- Call accepted by 58.107.154.6 (format ulaw)
-- Format for call is ulaw
-- IAX2/10027-4 is ringing
-- IAX2/10027-4 stopped sounds
-- IAX2/10027-4 answered SIP/203.166.103.230-b7b016a0
Jul 19 14:37:25 DEBUG[3217]: res_config_mysql.c:125 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM sip_buddies WHERE name = '203.166.103.230'
Jul 19 14:37:25 DEBUG[3217]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
Jul 19 14:37:25 DEBUG[3226]: chan_sip.c:1389 __sip_ack: Stopping retransmission on 'call-005B1534-AA15-DB11-001D-A598 at 203.166.103.235' of Response 200: Match Found
Jul 19 14:37:25 DEBUG[3225]: chan_iax2.c:6653 socket_read: Ooh, voice format changed to 4
Jul 19 14:37:28 DEBUG[3225]: chan_iax2.c:6944 socket_read: Immediately destroying 4, having received hangup
Jul 19 14:37:28 DEBUG[1153]: channel.c:3253 ast_generic_bridge: Didn't get a frame from channel: IAX2/10027-4
Jul 19 14:37:28 DEBUG[1153]: channel.c:3525 ast_channel_bridge: Bridge stops bridging channels SIP/203.166.103.230-b7b016a0 and IAX2/10027-4
Jul 19 14:37:28 DEBUG[1153]: chan_iax2.c:3053 iax2_hangup: We're hanging up IAX2/10027-4 now...
Jul 19 14:37:28 DEBUG[1153]: chan_iax2.c:3063 iax2_hangup: Really destroying IAX2/10027-4 now...
-- Hungup 'IAX2/10027-4'
Jul 19 14:37:28 DEBUG[1153]: app_dial.c:1586 dial_exec_full: Exiting with DIALSTATUS=ANSWER.
== Spawn extension (inbound, 61282138622, 1) exited non-zero on 'SIP/203.166.103.230-b7b016a0'
Jul 19 14:37:28 DEBUG[1153]: res_config_mysql.c:125 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM extensions_table WHERE exten = 'h' AND context = 'on-net' AND priority = '1'
Jul 19 14:37:28 DEBUG[1153]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
Jul 19 14:37:28 DEBUG[1153]: res_config_mysql.c:237 realtime_multi_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM extensions_table WHERE exten LIKE '\_%' AND context = 'on-net' AND priority = '1' ORDER BY exten
Jul 19 14:37:28 DEBUG[1153]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
---- /* update the CDR record and finished the bridged call */ ---------
Jul 19 14:37:28 DEBUG[1153]: cdr_addon_mysql.c:206 mysql_log: cdr_mysql: inserting a CDR record.
Jul 19 14:37:28 DEBUG[1153]: cdr_addon_mysql.c:222 mysql_log: cdr_mysql: SQL command as follows: INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,userfield) VALUES ('2006-07-19 14:37:22','0413509414','0413509414','61282138622','inbound', 'SIP/203.166.103.230-b7b016a0','IAX2/10027-4','Dial','IAX2/10027',6,3,'ANSWERED',3,'','')
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is '0413509414'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is '0413509414'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is '61282138622'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is 'inbound'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is 'SIP/203.166.103.230-b7b016a0'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is 'IAX2/10027-4'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is 'Dial'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is 'IAX2/10027'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is '2006-07-19 14:37:22'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is '2006-07-19 14:37:25'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is '2006-07-19 14:37:28'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is '6'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is '3'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is 'ANSWERED'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is 'DOCUMENTATION'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is '(null)'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is '1153283842.86'
Jul 19 14:37:28 DEBUG[1153]: pbx.c:1512 pbx_substitute_variables_helper_full: Function result is '(null)'
Jul 19 14:37:28 DEBUG[1153]: chan_sip.c:2409 sip_hangup: update_call_counter() - decrement call limit counter
Jul 19 14:37:28 DEBUG[3217]: res_config_mysql.c:125 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM sip_buddies WHERE name = '203.166.103.230'
Jul 19 14:37:28 DEBUG[3217]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
Jul 19 14:37:28 DEBUG[3226]: chan_sip.c:1389 __sip_ack: Stopping retransmission on 'call-005B1534-AA15-DB11-001D-A598 at 203.166.103.235' of Request 102: Match Found
Jul 19 14:37:29 DEBUG[3225]: chan_iax2.c:7127 socket_read: Peer lastms 8, historicms 8, maxms 2000
Jul 19 14:37:30 DEBUG[3225]: res_config_mysql.c:321 update_mysql: MySQL RealTime: Update SQL: UPDATE iax_buddies SET ipaddr = '202.138.213.226', port = '4569', regseconds = '1153283850' WHERE name = '10000'
Jul 19 14:37:30 DEBUG[3225]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
Jul 19 14:37:30 DEBUG[3225]: res_config_mysql.c:341 update_mysql: MySQL RealTime: Updated 1 rows on table: iax_buddies
Jul 19 14:37:30 DEBUG[3225]: res_config_mysql.c:321 update_mysql: MySQL RealTime: Update SQL: UPDATE iax_buddies SET ipaddr = '202.138.213.214', port = '4569', regseconds = '1153283850' WHERE name = '10022'
Jul 19 14:37:30 DEBUG[3225]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
Jul 19 14:37:30 DEBUG[3225]: res_config_mysql.c:341 update_mysql: MySQL RealTime: Updated 1 rows on table: iax_buddies
Jul 19 14:37:35 DEBUG[3225]: res_config_mysql.c:321 update_mysql: MySQL RealTime: Update SQL: UPDATE iax_buddies SET ipaddr = '124.168.30.18', port = '4569', regseconds = '1153283855' WHERE name = '10024'
Jul 19 14:37:35 DEBUG[3225]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
Jul 19 14:37:35 DEBUG[3225]: res_config_mysql.c:341 update_mysql: MySQL RealTime: Updated 1 rows on table: iax_buddies
Jul 19 14:37:37 DEBUG[3225]: chan_iax2.c:7127 socket_read: Peer lastms 16, historicms 16, maxms 2000
Jul 19 14:37:49 DEBUG[3225]: res_config_mysql.c:321 update_mysql: MySQL RealTime: Update SQL: UPDATE iax_buddies SET ipaddr = '58.107.154.6', port = '4569', regseconds = '1153283869' WHERE name = '10027'
Jul 19 14:37:49 DEBUG[3225]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
Jul 19 14:37:49 DEBUG[3225]: res_config_mysql.c:341 update_mysql: MySQL RealTime: Updated 1 rows on table: iax_buddies
Jul 19 14:38:01 DEBUG[3225]: chan_iax2.c:7127 socket_read: Peer lastms 12, historicms 12, maxms 2000
Jul 19 14:38:01 DEBUG[3225]: res_config_mysql.c:321 update_mysql: MySQL RealTime: Update SQL: UPDATE iax_buddies SET ipaddr = '150.101.193.214', port = '4569', regseconds = '1153283881' WHERE name = '10026'
Jul 19 14:38:01 DEBUG[3225]: res_config_mysql.c:636 mysql_reconnect: MySQL RealTime: Everything is fine.
Jul 19 14:38:01 DEBUG[3225]: res_config_mysql.c:341 update_mysql: MySQL RealTime: Updated 1 rows on table: iax_buddies
vgw1*CLI>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: customer_side_Asterisk.log
Type: application/octet-stream
Size: 4236 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20060718/bbeeff0b/customer_side_Asterisk.obj
More information about the asterisk-dev
mailing list