kjcsb
2006-Aug-08 18:52 UTC
[asterisk-users] Handling inbound and outbound calls passed from a proxy
I need to handle the following scenarios: 1. UA1 --> SIP Proxy --> Asterisk 2. UA2 --> SIP Proxy --> Asterisk --> PSTN gateway (SIP) I have configured a trunk to register with the SIP proxy: trunk1 register=user1:password1@SIP.Proxy/DID1 UA1 calls user1@SIP.Proxy and the call is recognised as being to DID1. I set up an inbound route for DID1 and route the call as appropriate. That deals with scenario 1. I then tried to configure another trunk to handle scenario 2: trunk2 context=from-internal host=SIP.Proxy type=peer register=user2:password2@SIP.Proxy A call to PSTN1 from the UA is passed to the SIP proxy which recognises it as PSTN call. The SIP proxy updates the From details and passes the call to Asterisk which (I presume) puts the call into the from-internal context and dials the outbound route appropriately. However that setup messes up scenario 1 which now gives a 404 back to UA1. I presume Asterisk is not differentiating between a call made to user1 from UA1 and a call made to PSTN1 from user2. It's just seeing a call from SIP.Proxy and putting it into the from-internal context. Could anyone advise how I would set up Asterisk to cope with both these scenarios? I could setup DID2 but I don't know how to pass the call onto the PSTN gateway. I am using AMP/FreePBX but if someone could advise the general principles I would appreciate it. Thanks Cameron
Fran Oliveira
2006-Aug-09 05:39 UTC
[asterisk-users] Handling inbound and outbound calls passed from a proxy
you must add option insecure=very|yes|no in sip.conf, see http://www.voip-info.org/wiki/index.php?page=Asterisk+config+sip.conf for more info by default incoming calls goes into default context have you checked if registration has occured in sipproxy? check debug messages in asterisk console 2006/8/9, kjcsb <kjcsb@orcon.net.nz>:> > I need to handle the following scenarios: > 1. UA1 --> SIP Proxy --> Asterisk > > 2. UA2 --> SIP Proxy --> Asterisk --> PSTN gateway (SIP) > > I have configured a trunk to register with the SIP proxy: > trunk1 > register=user1:password1@SIP.Proxy/DID1 > > UA1 calls user1@SIP.Proxy and the call is recognised as being to DID1. I > set > up an inbound route for DID1 and route the call as appropriate. That deals > with scenario 1. > > I then tried to configure another trunk to handle scenario 2: > trunk2 > context=from-internal > host=SIP.Proxy > type=peer > register=user2:password2@SIP.Proxy > > A call to PSTN1 from the UA is passed to the SIP proxy which recognises it > as PSTN call. The SIP proxy updates the From details and passes the call > to > Asterisk which (I presume) puts the call into the from-internal context > and > dials the outbound route appropriately. > > However that setup messes up scenario 1 which now gives a 404 back to UA1. > I > presume Asterisk is not differentiating between a call made to user1 from > UA1 and a call made to PSTN1 from user2. It's just seeing a call from > SIP.Proxy and putting it into the from-internal context. > > Could anyone advise how I would set up Asterisk to cope with both these > scenarios? I could setup DID2 but I don't know how to pass the call onto > the > PSTN gateway. I am using AMP/FreePBX but if someone could advise the > general > principles I would appreciate it. > > Thanks > > Cameron > > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060809/b103412f/attachment.htm