How make Asterisk change field "To" to PSTN callee number

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

How make Asterisk change field "To" to PSTN callee number

Postby dmitryvalento » Thu Jun 07, 2012 2:46 am

Hello
Our company using hardware SIP phones with FXO ports.
I have configured Asterisk - create user account for this phone, but I can't understand, how configure dialplan for transfer callee PSTN number to this phone?
As I understand - Asterisk have to modify filed "To" in SIP Invite message to callee PSTN number, but "Requst-URI" must stay as URI hardware SIP phone.
My current configuration:
---------------------------------------------------------------------------
sip.conf
Code: Select all
[general]
minexpiry=10
bindport=5060
context=router
allowoverlap=no
udpbindaddr=192.168.10.233
tcpenable=no
language=en
dtmfmode=rfc2833

[555]
type=friend
username=555
callerid=User555 <555>
context=router
secret=Emzior555
qualify=no ; linphone will become unreachable if qualify=yes
host=dynamic
canreinvite=no ; no
nat=no
port=50600

[777]                                                       
type=friend                                                 
username=777                                               
callerid=User777 <777>                                     
context=router                                             
secret=Emzior777                                           
qualify=no ; linphone will become unreachable if qualify=yes
host=dynamic                                               
canreinvite=no ; yes                                       
insecure=invite,port                                       
nat=nonat

---------------------------------------------------------------------------
extensions.conf
Code: Select all
[router]
include => outbound

exten => 777,1,Dial(SIP/777)

[outbound]
exten => _6.,1,Dial(SIP/555)

In this configuration I'm trying call PSTN callee from 777 user through 555 (hardware SIP phone)
dmitryvalento
Newsterisk
 
Posts: 5
Joined: Thu Jun 07, 2012 2:29 am

Re: How make Asterisk change field "To" to PSTN callee number

Postby s.khan » Thu Jun 07, 2012 3:43 am

hi,

Are you using analog port of hardphone or digital?

regards,

sohaib khan
s.khan
Newsterisk
 
Posts: 48
Joined: Thu May 05, 2011 2:40 pm

Re: How make Asterisk change field "To" to PSTN callee number

Postby dmitryvalento » Thu Jun 07, 2012 3:54 am

I'm using analog port of harphone.
dmitryvalento
Newsterisk
 
Posts: 5
Joined: Thu Jun 07, 2012 2:29 am

Re: How make Asterisk change field "To" to PSTN callee number

Postby s.khan » Thu Jun 07, 2012 4:01 am

Then you may need to configure it with your fxo port (with your fxo card), and then you need to call to that channel on which your phone is connected.

Let me google it more to understand the scenario and will get back you .

BTW, which fxo card you are using?

regards,

Sohaib Khan
s.khan
Newsterisk
 
Posts: 48
Joined: Thu May 05, 2011 2:40 pm

Re: How make Asterisk change field "To" to PSTN callee number

Postby dmitryvalento » Thu Jun 07, 2012 4:15 am

It's "noname" card(based on Si32260 chip) and it's not matter, because Asterisk running on dedicated server and talking with hardphone over SIP/RTP channel
dmitryvalento
Newsterisk
 
Posts: 5
Joined: Thu Jun 07, 2012 2:29 am

Re: How make Asterisk change field "To" to PSTN callee number

Postby s.khan » Thu Jun 07, 2012 4:24 am

have you configured your fxo port with your hardphone?
s.khan
Newsterisk
 
Posts: 48
Joined: Thu May 05, 2011 2:40 pm

Re: How make Asterisk change field "To" to PSTN callee number

Postby s.khan » Thu Jun 07, 2012 4:29 am

That's what i get after googling ... :-)

viewtopic.php?f=13&t=73774
s.khan
Newsterisk
 
Posts: 48
Joined: Thu May 05, 2011 2:40 pm

Re: How make Asterisk change field "To" to PSTN callee number

Postby dmitryvalento » Thu Jun 07, 2012 4:47 am

Thank You, Sohaib Khan for your quick responses.
But this ([url]viewtopic.php?f=13&t=73774[/url]) is not my case, because I don't have PCI card.

Harphone have configured only via Web Interface - there are some fields available to change - SIP name, SIP domain, SIP proxy, SIP password, preferable codecs, and others.
dmitryvalento
Newsterisk
 
Posts: 5
Joined: Thu Jun 07, 2012 2:29 am

Re: How make Asterisk change field "To" to PSTN callee number

Postby s.khan » Thu Jun 07, 2012 4:54 am

ooohhh... you mean you are configuring hardphone via on SIP... I was thinking you are configuring on fxo ... lol.. sorry for misunderstanding...

just read it...
in this case you need to add ${EXTEN}
[outbound]
exten => _6.,1,Dial(SIP/555/${EXTEN})
so what ever the number you are dialing (starting from 6) it will dial through 555.
s.khan
Newsterisk
 
Posts: 48
Joined: Thu May 05, 2011 2:40 pm

Re: How make Asterisk change field "To" to PSTN callee number

Postby dmitryvalento » Thu Jun 07, 2012 6:24 am

Thank You.
It's work!
dmitryvalento
Newsterisk
 
Posts: 5
Joined: Thu Jun 07, 2012 2:29 am

Re: How make Asterisk change field "To" to PSTN callee number

Postby s.khan » Thu Jun 07, 2012 8:07 am

you are welcome... :-)
s.khan
Newsterisk
 
Posts: 48
Joined: Thu May 05, 2011 2:40 pm


Return to Asterisk Support

Who is online

Users browsing this forum: zenki511 and 16 guests