[asterisk-users] RE: [asterisk-dev] How to send DNIS(B-party number) in IAX trunk

Sam Liang samliang at isphone.com.au
Wed Jul 19 16:45:55 MST 2006


Hi Rehan,


I would like to make the my problem a little bit more clear.

My test scheme is below:


     R1                    R2                      IAX trunk    
DX <-----> PORTASIP  <------------>  ASTERISK-root <------> Astrerisk-client



DX connect to ISDN E1,  says, got 100 Australian number from 61282138600 to
61282138699 assign to it.

I create the route R1 without any problem.  From PortaSIP, we pass the call
by a sip trunk name R2,  this one proved to be fine, since I can read from
the real time log of the ASTERISK-root script that
/var/lib/asterisk/agi-bin/dialparties.agi had already output the messages,
said that it filter out the dnid=61282138622.  The ASTERISK-root, according
the dnid=61282138622, bridges the call invite through IAX trunk to invite
the Asterisk-client.

I can read from the Asterisk-client real time log as below:
(ASTERISK-root with address 203.166.103.230)


-- Accepting AUTHENTICATED call from 203.166.103.230:      
       > requested format = g729,
       > requested prefs = (),
       > actual format = ulaw,
       > host prefs = (ulaw|alaw|gsm|g729),
       > priority = mine
    -- Executing Set("IAX2/isphone-2", "FROM_DID=s/0413509414") in new stack
    -- Executing Goto("IAX2/isphone-2", "ext-local|200|1") in new stack
    -- Goto (ext-local,200,1)
    -- Executing Macro("IAX2/isphone-2", "exten-vm|200|200") in new stack
    -- Executing Macro("IAX2/isphone-2", "user-callerid") in new stack
    -- Executing Set("IAX2/isphone-2", "AMPUSER=") in new stack
    -- Executing Set("IAX2/isphone-2", "EMERGENCYCID=") in new stack
    -- Executing Set("IAX2/isphone-2", "AMPUSERCIDNAME=") in new stack
    -- Executing GotoIf("IAX2/isphone-2", "1?6") in new stack
    -- Goto (macro-user-callerid,s,6)
    -- Executing NoOp("IAX2/isphone-2", "Using CallerID "" <0413509414>") in
new stack
    -- Executing Set("IAX2/isphone-2", "FROMCONTEXT=exten-vm") in new stack
    -- Executing Macro("IAX2/isphone-2", "record-enable|200|IN") in new
stack
    -- Executing GotoIf("IAX2/isphone-2", "0 > 0?2:4") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing AGI("IAX2/isphone-2",
"recordingcheck|20060719-143711|1153283831.27") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
  recordingcheck|20060719-143711|1153283831.27: Inbound recording not
enabled
    -- AGI Script recordingcheck completed, returning 0
    -- Executing NoOp("IAX2/isphone-2", "No recording needed") in new stack
    -- Executing Macro("IAX2/isphone-2", "dial|15|tr|200") in new stack
    -- Executing AGI("IAX2/isphone-2", "dialparties.agi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
    --  dialparties.agi: priority = 1
    --  dialparties.agi: callingani2 = 0
    --  dialparties.agi: accountcode = 
    --  dialparties.agi: channel = IAX2/isphone-2
    --  dialparties.agi: callerid = 0413509414
    --  dialparties.agi: context = macro-dial
    --  dialparties.agi: callington = 0
    --  dialparties.agi: dnid = unknown
    --  dialparties.agi: request = dialparties.agi
    --  dialparties.agi: calleridname = unknown
    --  dialparties.agi: extension = s
    --  dialparties.agi: language = en
    --  dialparties.agi: uniqueid = 1153283831.27
    --  dialparties.agi: callingpres = 0
    --  dialparties.agi: type = IAX2
    --  dialparties.agi: rdnis = unknown
    --  dialparties.agi: callingtns = 0
    --  dialparties.agi: enhanced = 0.0
  dialparties.agi: Caller ID name is 'unknown' number is '0413509414'
  dialparties.agi: Methodology of ring is  'none'
    --  dialparties.agi: Added extension 200 to extension map
    --  dialparties.agi: Extension 200 cf is disabled
    --  dialparties.agi: Extension 200 do not disturb is disabled
       >  dialparties.agi: extnum: 200
       >  dialparties.agi: exthascw: 0
       >  dialparties.agi: exthascfb: 0
       >  dialparties.agi: extcfb: 
    --  dialparties.agi: Checking CW and CFB status for extension 200
  == Parsing '/etc/asterisk/manager.conf': Found
  == Parsing '/etc/asterisk/manager_custom.conf': Found
  == Manager 'admin' logged on from 127.0.0.1
    --  dialparties.agi: Correct AMPMGRUSER and AMPMGRPASS
       >  dialparties.agi: extstate: 0
  == Manager 'admin' logged off from 127.0.0.1
  dialparties.agi: Extension 200 is available...skipping checks
    --  dialparties.agi: DbSet CALLTRACE/200 to 0413509414
    -- AGI Script dialparties.agi completed, returning 0
    -- Executing Dial("IAX2/isphone-2", "IAX2/200|15|tr") in new stack
    -- Called 200
    -- Call accepted by 61.29.101.98 (format ulaw)
    -- Format for call is ulaw
    -- IAX2/200-5 is ringing
    -- IAX2/200-5 answered IAX2/isphone-2
    -- Attempting native bridge of IAX2/isphone-2 and IAX2/200-5
    -- Hungup 'IAX2/200-5'
  == Spawn extension (macro-dial, s, 10) exited non-zero on 'IAX2/isphone-2'
in macro 'dial'
  == Spawn extension (macro-dial, s, 10) exited non-zero on 'IAX2/isphone-2'
in macro 'exten-vm'
  == Spawn extension (macro-dial, s, 10) exited non-zero on 'IAX2/isphone-2'
    -- Hungup 'IAX2/isphone-2'


>From the log messages above us, I am sure the Asterisk-client can not get
the dnid, or the dnid = unknown is got by the
/var/lib/asterisk/agi-bin/dialparties.agi.  Consequently I must create a
route in asterisk to said, DID=*/callerid=0413509414 will be route to
extensions 200.

That make the call from mobile 0413509414 to 821386[XX] go to extensions
200.  But what I want to make for the client is, provided I can pass the
DNID to the customer Premium, DID=82138622 to extension 200, DID=32138600 to
receptionist, etc...

I am stuck on the place of unable to pass the DNID variable to the
Asterisk-client by IAX-trunk.

The reason of we want to create an Asterisk-root between our PortaSIP and
the Asterisk-client is, we want to be benefit from the IAX trunk of packet
saving and etc.

But we just can not pass the DNID(B-party number to the client Asterisk)
Hope that you can have some idea to help us.

We did not get the DID from didx.

Best regards,

Sam

-----Original Message-----
From: Rehan AllahWala [mailto:rehan at supertec.com] 
Sent: Wednesday, July 19, 2006 5:53 PM
To: samliang at isphone.com.au
Subject: Re: [asterisk-dev] How to send DNIS(B-party number) in IAX trunk

Hello,

Have u tried did's from didx if they pass dnis to u ?

Rehan

From:	"Sam Liang" <samliang at isphone.com.au>
To:	<asterisk-dev at lists.digium.com>
Date sent:	Wed, 19 Jul 2006 14:53:04 +1000
Subject:	[asterisk-dev] How to send DNIS(B-party number) in IAX trunk
Send reply to:	Asterisk Developers Mailing List
<asterisk-dev at lists.digium.com>
	<mailto:asterisk-dev-request at lists.digium.com?subject=unsubscribe>
	<mailto:asterisk-dev-request at lists.digium.com?subject=subscribe>

> 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
> 
>  
> 
> 


Super Technologies Inc., Pensacola, Florida
http://www.SuperTec.com - Technologies from tomorrow, Today!

MSN: Rehan at Rehan.com
Skype: Rehan33



_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev




More information about the asterisk-users mailing list