Ian Chilton
2004-Dec-23 08:49 UTC
[Asterisk-Users] Incoming calls from Sipgate go through the wrong peer
Hi, I have a few accounts with sipgate.co.uk to get some different DiD numbers. However, when an incoming call comes in, it seems to pick the wrong peer from sip.conf which sends the call into the wrong context and it fails because there is no extension in that context to match the register. Using the config's below, if I dial the DiD on account 2222222, it works fine - picks peer 2222222 and goes into the context incoming_sipgate_menu. But, if I dial the DiD on account 1111111, it also picks peer 2222222 and errors because there is no 1111111 in context incoming_sipgate_menu because it should have gone into incoming_sipgate. register => 1111111:password@sipgate.co.uk/1111111 register => 2222222:password@sipgate.co.uk/2222222 ; this one is for outgoing: [sipgate] type=peer context=incoming_sipgate username=1111111 secret=password host=sipgate.co.uk fromuser=1111111 fromdomain=sipgate.co.uk insecure=very dtmfmode=info ; incoming on account 1111111: [111111] type=friend context=incoming_sipgate host=sipgate.co.uk username=1111111 authname=1111111 secret=password domain=sipgate.co.uk insecure=very dtmfmode=info [2222222] type=friend context=incoming_sipgate_menu host=sipgate.co.uk username=2222222 authname=2222222 secret=password domain=sipgate.co.uk insecure=very Anyone else use sipgate with Asterisk or have any ideas? Thanks! --ian
Olle E. Johansson
2004-Dec-23 09:13 UTC
[Asterisk-Users] Incoming calls from Sipgate go through the wrong peer
For incoming calls, Asterisk matches peer's on IP, meaning that the first peer it finds will match. This is the *last* one you have in sip.conf. The context given in that peer must have *all* extensions you need for incoming calls, which is the extension at the end of the register= line in the [general] section sip.conf. /Olle
Karl Brose
2004-Dec-23 12:08 UTC
[Asterisk-Users] Incoming calls from Sipgate go through the wrong peer
This is still a nasty design flaw (bug) in Asterisk. IAX is similarly bugged. I can only ask you to wait a little bit longer until I post the solution. Ian Chilton wrote:>Hi, > >I have a few accounts with sipgate.co.uk to get some different DiD >numbers. However, when an incoming call comes in, it seems to pick the >wrong peer from sip.conf which sends the call into the wrong context and >it fails because there is no extension in that context to match the >register. > >Using the config's below, if I dial the DiD on account 2222222, it works >fine - picks peer 2222222 and goes into the context >incoming_sipgate_menu. But, if I dial the DiD on account 1111111, it >also picks peer 2222222 and errors because there is no 1111111 in >context incoming_sipgate_menu because it should have gone into >incoming_sipgate. > >register => 1111111:password@sipgate.co.uk/1111111 >register => 2222222:password@sipgate.co.uk/2222222 > >; this one is for outgoing: >[sipgate] > type=peer > context=incoming_sipgate > username=1111111 > secret=password > host=sipgate.co.uk > fromuser=1111111 > fromdomain=sipgate.co.uk > insecure=very > dtmfmode=info > >; incoming on account 1111111: >[111111] > type=friend > context=incoming_sipgate > host=sipgate.co.uk > username=1111111 > authname=1111111 > secret=password > domain=sipgate.co.uk > insecure=very > dtmfmode=info > >[2222222] > type=friend > context=incoming_sipgate_menu > host=sipgate.co.uk > username=2222222 > authname=2222222 > secret=password > domain=sipgate.co.uk > insecure=very > > >Anyone else use sipgate with Asterisk or have any ideas? > > >Thanks! > >--ian > >_______________________________________________ >Asterisk-Users mailing list >Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > > >