Vicky Shrestha
2005-Mar-10 12:03 UTC
[Asterisk-Users] asterisk and Broadvoice Outgoing Again :(
Hi, I can't make outgoing calls via Broadvoice. I have tried each and every configuration that was posted to list previously. I am able to receive incoming calls fine. I get the following in asterisk console: ====================================================asterisk*CLI> show version Asterisk CVS-HEAD-03/10/05-22:51:28 built by vicky@asterisk on a i686 running Linux asterisk*CLI> -- Executing Dial("SIP/502-c147", "SIP/18086749157@XXXXXXXX") in new stack -- Called 18086749157@XXXXXXXX -- Got SIP response 400 "Bad request" back from 147.135.8.128 -- SIP/XXXXXXXX-19dd is circuit-busy == Everyone is busy/congested at this time (1:0/1/0) -- Executing Congestion("SIP/502-c147", "5") in new stack == Spawn extension (vicky, 0018086749157, 2) exited non-zero on 'SIP/502-c147' -- Got SIP response 400 "Bad request" back from 147.135.8.128 -- Executing Dial("SIP/502-8efd", "SIP/8086749157@XXXXXXXX") in new stack -- Called 8086749157@XXXXXXXX -- Got SIP response 400 "Bad request" back from 147.135.8.128 -- SIP/XXXXXXXX-4bf5 is circuit-busy == Everyone is busy/congested at this time (1:0/1/0) -- Executing Congestion("SIP/502-8efd", "5") in new stack == Spawn extension (vicky, 008086749157, 2) exited non-zero on 'SIP/502-8efd' -- Got SIP response 400 "Bad request" back from 147.135.8.128 -- Got SIP response 481 "Unknown Dialog" back from 147.135.8.128 =================================================== Here is my sip.conf: ======================================================register => XXXXXXXX@sip.broadvoice.com:PPPPPPPP:XXXXXXXX@sip.broadvoice.com/broadvoice [XXXXXXXX] type=peer user=phone host=sip.broadvoice.com fromdomain=sip.broadvoice.com fromuser=XXXXXXXX secret=PPPPPPPP username=XXXXXXXX insecure=very context=default authname=XXXXXXXX dtmfmode=inband dtmf=inband canreinvite=no =============================================== -- With regards, Vicky Shrestha System Director WorldLink Communications Jawalakhel , Kathmandu, Nepal
Dan Weber
2005-Mar-10 13:45 UTC
[Asterisk-Users] asterisk and Broadvoice Outgoing Again :(
> Here is my sip.conf: > ======================================================> register => > XXXXXXXX@sip.broadvoice.com:PPPPPPPP:XXXXXXXX@sip.broadvoice.com/broadvoice > > [XXXXXXXX] > type=peer > user=phone > host=sip.broadvoice.com > fromdomain=sip.broadvoice.com > fromuser=XXXXXXXX > secret=PPPPPPPP > username=XXXXXXXX > insecure=very > context=default > authname=XXXXXXXX > dtmfmode=inband > dtmf=inband > canreinvite=no > ===============================================Contact information must not change between register and call. Whats happening here is that when you register its broadvoice@yourip, however, when you call, its XXXXXXXXXX@yourip. Change the extension of the register to match your phone number. Dan
Randy Johnson
2005-Mar-10 15:11 UTC
[Asterisk-Users] asterisk and Broadvoice Outgoing Again :(
What does insecure=very do? Dan Weber wrote:> >> Here is my sip.conf: >> ======================================================>> register => >> XXXXXXXX@sip.broadvoice.com:PPPPPPPP:XXXXXXXX@sip.broadvoice.com/broadvoice >> >> >> [XXXXXXXX] >> type=peer >> user=phone >> host=sip.broadvoice.com >> fromdomain=sip.broadvoice.com >> fromuser=XXXXXXXX >> secret=PPPPPPPP >> username=XXXXXXXX >> insecure=very >> context=default >> authname=XXXXXXXX >> dtmfmode=inband >> dtmf=inband >> canreinvite=no >> ===============================================> > > Contact information must not change between register and call. Whats > happening here is that when you register its broadvoice@yourip, > however, when you call, its XXXXXXXXXX@yourip. Change the extension > of the register to match your phone number. > > Dan > _______________________________________________ > 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 >
Rich Adamson
2005-Mar-11 15:03 UTC
[Asterisk-Users] asterisk and Broadvoice Outgoing Again :(
For everyone that's trying to get BV to work, you'all might want to edit your /etc/hosts file and insert something like: 147.135.8.128 sip.broadvoice.com This was a requirement from way back and I've since discontinuted BV for a different provider, but seems as though of all the suggestions posted in recent weeks, few mention the above. After editing /etc/hosts, there is no need to reboot, etc. The contents are read dynamically. Then make sure that your contexts and extensions.conf use sip.broadvoice.com in them. They did have four different servers at one time (with four different IP's), but if you stick with one (like the above) and play with the other parameters to get it to work, then you can change servers at a later time. As one more comment, any changes that you make to sip.conf or extensions.conf associated with trying to make BV work, don't forget to "stop" and restart asterisk. Don't rely on a reload as it does not reread all parameter changes. ------------------------> > I can't make outgoing calls via Broadvoice. I have tried each and every > configuration that was posted to list previously. > > I am able to receive incoming calls fine. > > I get the following in asterisk console: > ====================================================> asterisk*CLI> show version > Asterisk CVS-HEAD-03/10/05-22:51:28 built by vicky@asterisk on a i686 running > Linux > asterisk*CLI> > -- Executing Dial("SIP/502-c147", "SIP/18086749157@XXXXXXXX") in new stack > -- Called 18086749157@XXXXXXXX > -- Got SIP response 400 "Bad request" back from 147.135.8.128 > -- SIP/XXXXXXXX-19dd is circuit-busy > == Everyone is busy/congested at this time (1:0/1/0) > -- Executing Congestion("SIP/502-c147", "5") in new stack > == Spawn extension (vicky, 0018086749157, 2) exited non-zero on > 'SIP/502-c147' > -- Got SIP response 400 "Bad request" back from 147.135.8.128 > -- Executing Dial("SIP/502-8efd", "SIP/8086749157@XXXXXXXX") in new stack > -- Called 8086749157@XXXXXXXX > -- Got SIP response 400 "Bad request" back from 147.135.8.128 > -- SIP/XXXXXXXX-4bf5 is circuit-busy > == Everyone is busy/congested at this time (1:0/1/0) > -- Executing Congestion("SIP/502-8efd", "5") in new stack > == Spawn extension (vicky, 008086749157, 2) exited non-zero on > 'SIP/502-8efd' > -- Got SIP response 400 "Bad request" back from 147.135.8.128 > -- Got SIP response 481 "Unknown Dialog" back from 147.135.8.128 > ===================================================> > Here is my sip.conf: > ======================================================> register => > XXXXXXXX@sip.broadvoice.com:PPPPPPPP:XXXXXXXX@sip.broadvoice.com/broadvoice > > [XXXXXXXX] > type=peer > user=phone > host=sip.broadvoice.com > fromdomain=sip.broadvoice.com > fromuser=XXXXXXXX > secret=PPPPPPPP > username=XXXXXXXX > insecure=very > context=default > authname=XXXXXXXX > dtmfmode=inband > dtmf=inband > canreinvite=no > ===============================================> > > -- > With regards, > > Vicky Shrestha > System Director > WorldLink Communications > Jawalakhel , Kathmandu, Nepal > _______________________________________________ > 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 >---------------End of Original Message-----------------
Dimitris Kounalakis
2005-Mar-13 22:24 UTC
[Asterisk-Users] asterisk and Broadvoice Outgoing Again :(
I never managed to make outgoing calls to broadvoice without the following patch to the file channels/chan_sip.c it comes from http://edvina.net/broadvoice/ and it is the only fraction that it is still needed for outgoing calls. It does not cause any problems with other sip devices that are connected to my asterisk box. if you do not patch it, then in sip debug you will notice that broadvoice gives you an error message: I do not remember it anymore, but it should be unauthorised or access not allowed something like this. ---------------------------------------------------- --- channels/chan_sip.c.old 2005-03-12 18:10:49.000000000 +0200 +++ channels/chan_sip.c 2005-03-14 07:20:18.000000000 +0200 @@ -3701,16 +3701,28 @@ /* If we have full contact, trust it */ strncpy(invite, p->fullcontact, sizeof(invite) - 1); /* Otherwise, use the username while waiting for registration */ - } else if (!ast_strlen_zero(p->username)) { - if (ntohs(p->sa.sin_port) != DEFAULT_SIP_PORT) { - snprintf(invite, sizeof(invite), "sip:%s@%s:%d",p->username, p->tohost, ntohs(p->sa.sin_port)); +} else { + /* If we have set the fromdomain, this is also used + as the to domain for SIP calls to a peer. Fromdomain + is used for calls to SIP proxys mostly + */ + char fromdomain[256]; + if (!ast_strlen_zero(p->fromdomain)) { + strncpy(fromdomain, p->fromdomain, sizeof(fromdomain) -1); } else { - snprintf(invite, sizeof(invite), "sip:%s@%s",p->username, p->tohost); + strncpy(fromdomain, p->tohost, sizeof(fromdomain) -1); + } + if (!ast_strlen_zero(p->username)) { + if (ntohs(p->sa.sin_port) != DEFAULT_SIP_PORT) { + snprintf(invite, sizeof(invite), "sip:%s@%s:%d",p->username, fromdomain, ntohs(p->sa.sin_port)); + } else { + snprintf(invite, sizeof(invite), "sip:%s@%s",p->username, fromdomain); + } + } else if (ntohs(p->sa.sin_port) != DEFAULT_SIP_PORT) { + snprintf(invite, sizeof(invite), "sip:%s:%d", fromdomain, ntohs(p->sa.sin_port)); + } else { + snprintf(invite, sizeof(invite), "sip:%s", fromdomain); } - } else if (ntohs(p->sa.sin_port) != DEFAULT_SIP_PORT) { - snprintf(invite, sizeof(invite), "sip:%s:%d", p->tohost, ntohs(p->sa.sin_port)); - } else { - snprintf(invite, sizeof(invite), "sip:%s", p->tohost); } strncpy(p->uri, invite, sizeof(p->uri) - 1); /* If there is a VXML URL append it to the SIP URL */
Brian Dingman
2005-Mar-13 23:34 UTC
[Asterisk-Users] asterisk and Broadvoice Outgoing Again :(
I thought this patch was added into the 1.04 and later source code? On Mon, 14 Mar 2005 07:24:44 +0200, Dimitris Kounalakis <dcoun@medsite.info> wrote:> I never managed to make outgoing calls to broadvoice without the > following patch to the file channels/chan_sip.c > it comes from http://edvina.net/broadvoice/ and it is the only fraction > that it is still needed for outgoing calls. > It does not cause any problems with other sip devices that are connected > to my asterisk box. > if you do not patch it, then in sip debug you will notice that > broadvoice gives you an error message: > I do not remember it anymore, but it should be unauthorised or access > not allowed something like this. > ---------------------------------------------------- > --- channels/chan_sip.c.old 2005-03-12 18:10:49.000000000 +0200 > +++ channels/chan_sip.c 2005-03-14 07:20:18.000000000 +0200 > @@ -3701,16 +3701,28 @@ > /* If we have full contact, trust it */ > strncpy(invite, p->fullcontact, sizeof(invite) - 1); > /* Otherwise, use the username while waiting for registration */ > - } else if (!ast_strlen_zero(p->username)) { > - if (ntohs(p->sa.sin_port) != DEFAULT_SIP_PORT) { > - snprintf(invite, sizeof(invite), > "sip:%s@%s:%d",p->username, p->tohost, ntohs(p->sa.sin_port)); > +} else { > + /* If we have set the fromdomain, this is also used > + as the to domain for SIP calls to a peer. Fromdomain > + is used for calls to SIP proxys mostly > + */ > + char fromdomain[256]; > + if (!ast_strlen_zero(p->fromdomain)) { > + strncpy(fromdomain, p->fromdomain, > sizeof(fromdomain) -1); > } else { > - snprintf(invite, sizeof(invite), > "sip:%s@%s",p->username, p->tohost); > + strncpy(fromdomain, p->tohost, > sizeof(fromdomain) -1); > + } > + if (!ast_strlen_zero(p->username)) { > + if (ntohs(p->sa.sin_port) != DEFAULT_SIP_PORT) { > + snprintf(invite, sizeof(invite), > "sip:%s@%s:%d",p->username, fromdomain, ntohs(p->sa.sin_port)); > + } else { > + snprintf(invite, sizeof(invite), > "sip:%s@%s",p->username, fromdomain); > + } > + } else if (ntohs(p->sa.sin_port) != DEFAULT_SIP_PORT) { > + snprintf(invite, sizeof(invite), "sip:%s:%d", > fromdomain, ntohs(p->sa.sin_port)); > + } else { > + snprintf(invite, sizeof(invite), "sip:%s", > fromdomain); > } > - } else if (ntohs(p->sa.sin_port) != DEFAULT_SIP_PORT) { > - snprintf(invite, sizeof(invite), "sip:%s:%d", p->tohost, > ntohs(p->sa.sin_port)); > - } else { > - snprintf(invite, sizeof(invite), "sip:%s", p->tohost); > } > strncpy(p->uri, invite, sizeof(p->uri) - 1); > /* If there is a VXML URL append it to the SIP URL */ > > _______________________________________________ > 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 >