cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mtr
New Contributor

Bad From header when sending to freeswitch

Jump to solution

HI

i have a adtran 980e that is working fine on my opensips right now i am trying to move it to an freeswitch and its not working

the tech guy from freeswitch told me that its an issue with the from header see below

This is the BAD FROM Header the device is sending

2018/08/02 18:16:20.407581 96.xxx.xxx.211:5060 -> 165.xxx.xxx.243:5060

INVITE sip:1nxxnxxxxxxx@sbc.abc.cloud:5060 SIP/2.0

From: <sip:sbc.abc.cloud:5060;transport=UDP>;tag=4de79a0-7f000001-13c4-3a7d-70f521b2-3a7d

To: <sip:nxxnxxxxxxx@sbc.abc.cloud:5060>

Call-ID: 4e29660-7f000001-13c4-3a7d-2854f0b-3a7d@sbc.dataphone.cloud

CSeq: 1 INVITE

Via: SIP/2.0/UDP 96.57.140.211:5060;branch=z9hG4bK-3a7d-e4797f-4cee2846

Max-Forwards: 70

Supported: 100rel,replaces

Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, PRACK, REFER, REGISTER

User-Agent: ADTRAN_Total_Access_908e_2nd_Gen/R11.10.1.E

Contact: <sip:96.xxx.xxx.xxx:5060;transport=UDP>

Content-Type: application/sdp

Content-Length: 257

This is a good one

2018/08/02 18:18:56.053365 54.xxx.xxx.163:5090 -> 165.xxx.xxx.243:5060

INVITE sip:18454263110@96.xxx.xxx.211:5060 SIP/2.0

Via: SIP/2.0/UDP 54.xxx.xxx.163:5090;rport;branch=z9hG4bKpN30QNNX8By4c

Max-Forwards: 68

From: "7185695157" <sip:7185695157@54.xxx.xxx.163>;tag=F2QgjBNZ1F4Na

To: <sip:18454263110@96.xxx.xxx.211:5060>

Call-ID: 715c3bf4-1123-1237-8689-005056976403

CSeq: 126280921 INVITE

Contact: <sip:mod_sofia@54.xxx.xxx.163:5090>

User-Agent: cgrtbilling_V2.5

Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REFER, NOTIFY

Supported: path, replaces

Allow-Events: talk, hold, conference, refer

Content-Type: application/sdp

Content-Disposition: session

Content-Length: 294

X-cid: 1282146318_129495037@208.xxx.xxx.203

X-FS-Support: update_display,send_info

Remote-Party-ID: "7185695157" <sip:7185695157@54.xxx.xxxx.163>;party=calling;screen=yes;privacy=off

BTW the PBX is not sending any callerID info so i am sending it from the adtran by using the ANI Substitution

0 Kudos
1 Solution

Accepted Solutions
Anonymous
Not applicable

Re: Bad From header when sending to freeswitch

Jump to solution

ok, once you get the debug i can see exactly what is going on, we can make the changes necessary to make it work.

View solution in original post

0 Kudos
14 Replies
jayh
Honored Contributor
Honored Contributor

Re: Bad From header when sending to freeswitch

Jump to solution

The ANI isn't appearing in the INVITE. Rather than using ANI substitution, try the following command on the trunk incoming from the PBX:

caller-id-override number-inbound 7185695157

mtr
New Contributor

Re: Bad From header when sending to freeswitch

Jump to solution

This is for outgoing calls do I still write inbound

jayh
Honored Contributor
Honored Contributor

Re: Bad From header when sending to freeswitch

Jump to solution

mtr wrote:

This is for outgoing calls do I still write inbound

Yes. The commands are looking from the standpoint of the interface or trunk as seen by the Adtran box. The caller-id is inbound to the Adtran from the PBX.

mtr
New Contributor

Re: Bad From header when sending to freeswitch

Jump to solution

ok i will report back tomorrow on this

mtr
New Contributor

Re: Bad From header when sending to freeswitch

Jump to solution

still not working

this is how my config looks like

voice trunk T01 type sip

  description "ipsbc"

  caller-id-override number-inbound 845XXXXX10

  match dnis "NXX-XXXX" substitute "1845-NXX-XXXX"

  match dnis "NXX-NXX-XXXX" substitute "1NXX-NXX-XXXX"

  sip-server primary sip.abc.cloud

  outbound-proxy primary sip.abc.cloud

  dial-string source to

  grammar from user international

Anonymous
Not applicable

Re: Bad From header when sending to freeswitch

Jump to solution

Moshe,

The ANI substitution command should work and you shouldn't need the caller-id command.

What I need is your full config. please post that and remove passwords.

next enter the following debug during an outbound call and attach it in a .txt file.

debug sip stack messages

debug sip cldu

debug voice verbose

-Mark

mtr
New Contributor

Re: Bad From header when sending to freeswitch

Jump to solution

!

!

! ADTRAN, Inc. OS version R11.10.1.E

! Boot ROM version 14.05.00.SA

! Platform: Total Access 908e (2nd Gen), part number 4242908L1

! Serial number CFG1072894

!

!

hostname "TA908e"

enable password xxxxx

!

!

clock timezone -5-Eastern-Time

!

ip subnet-zero

ip classless

ip default-gateway xxx.xxx.xxx.xxx

ip routing

ipv6 unicast-routing

!

!

name-server 8.8.8.8

!

!

no auto-config

!

event-history on

no logging forwarding

no logging email

!

no service password-encryption

!

username "xxxxx" password "xxxxx"

!

!

ip firewall

ip firewall stealth

no ip firewall alg msn

no ip firewall alg mszone

no ip firewall alg h323

!

!

!

!

!

!

!

!

no dot11ap access-point-control

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

interface eth 0/1

  ip address  192.168.1.200  255.255.255.0

  media-gateway ip primary

  no awcp

  no shutdown

!

!

interface eth 0/2

  description WAN

  ip address  xxx.xxx.xxx.xxx  255.255.255.xxx

  ip mtu 1500

  ip access-policy Public

  media-gateway ip primary

  no awcp

  no shutdown

!

!

!

!

interface t1 0/1

  description PRI to PBX 2

  tdm-group 2 timeslots 1-24 speed 64

  no shutdown

!

interface t1 0/2

  no shutdown

!

interface t1 0/3

  no shutdown

!

interface t1 0/4

  tdm-group 1 timeslots 1-24 speed 64

  no shutdown

!

!

interface pri 1

  description pri 1

  isdn name-delivery setup

  connect t1 0/4 tdm-group 1

  digits-transferred 4

  no shutdown

!

!

interface fxs 0/1

  no shutdown

!

interface fxs 0/2

  no shutdown

!

interface fxs 0/3

  no shutdown

!

interface fxs 0/4

  no shutdown

!

interface fxs 0/5

  no shutdown

!

interface fxs 0/6

  no shutdown

!

interface fxs 0/7

  no shutdown

!

interface fxs 0/8

  no shutdown

!

!

interface fxo 0/0

  no shutdown

!

!

isdn-group 1

  connect pri 1

!

!

!

!

!

!

!

ip access-list extended Admin

  remark Admin Access

  permit tcp any  any eq ssh   log

  permit tcp any  any eq https   log

!

ip access-list extended SIP

  remark SIP Service Provider

  permit udp host xxx.xxx.xxx.110  any eq 5060  

  permit udp host xxx.xxx.xxx.243  any eq 5060  

!

ip access-list extended T

!

!

!

!

ip policy-class Public

  allow list Admin self

  allow list SIP self

!

!

!

no tftp server

no tftp server overwrite

http server

http secure-server

no snmp agent

no ip ftp server

no ip scp server

no ip sntp server

!

!

!

!

!

!

!

!

sip

sip udp 5060

no sip tcp

!

!

!

voice feature-mode network

voice forward-mode network

!

!

!

!

!

!

!

!

voice dial-plan 1 local NXX-XXX-XXXX

voice dial-plan 2 long-distance 1-NXX-XXX-XXXX

voice dial-plan 3 toll-free MXXX

!

!

!

!

!

!

voice trunk T01 type sip

  description "ipsbc"

  match dnis "NXX-XXXX" substitute "1845-NXX-XXXX"

  match dnis "NXX-NXX-XXXX" substitute "1NXX-NXX-XXXX"

  match ani "$" substitute "845426xxxx"

  sip-server primary sip.abc.cloud

  outbound-proxy primary sip.abc.cloud

  dial-string source to

  grammar from user international

!

voice trunk T02 type isdn

  resource-selection circular descending

  connect isdn-group 1

  no early-cut-through

  t38

  rtp delay-mode adaptive

!

!

voice grouped-trunk PRI

  trunk T02

  accept $ cost 0

!

!

voice grouped-trunk SIP

  trunk T01

  accept $ cost 0

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

sip grammar request-uri host domain

sip grammar to host domain

!

!

!

!

!

!

!

line con 0

  login

!

line telnet 0 4

  login

  no shutdown

line ssh 0 4

  login local-userlist

  no shutdown

!

!

!

!

!

end

mtr
New Contributor

Re: Bad From header when sending to freeswitch

Jump to solution

i will wait for call to start and will post the debug output

Anonymous
Not applicable

Re: Bad From header when sending to freeswitch

Jump to solution

also if your using FQDN on your sip server enter the following:

voip name-service host sip.abc.cloud sip udp

voip name-service verification attempts 5 interval 30

then you can see what IPs are resolved in your FQDN:

show voip name-service cache

see if it matches your access list:

ip access-list extended SIP

  remark SIP Service Provider

  permit udp host xxx.xxx.xxx.110  any eq 5060 

  permit udp host xxx.xxx.xxx.243  any eq 5060 

also i would remove this from T01, not needed

then add your domain to T01

voice trunk t01

no outbound-proxy primary sip.abc.cloud

domain sip.abc.cloud

what are you trying to accomplish with your ani substitution command?

That might be one of your problems.

you probably will need to swap it but will see what the debug says when you place a call.

mtr
New Contributor

Re: Bad From header when sending to freeswitch

Jump to solution

My PBX is not sending callerID Info i am trying to set the callerID on the adtran Device

Anonymous
Not applicable

Re: Bad From header when sending to freeswitch

Jump to solution

Have you tried adding the commands below to you PRI interface?

interface pri 1

  calling-party override if-no-CID

  calling-party number NPANXXXXXX

Anonymous
Not applicable

Re: Bad From header when sending to freeswitch

Jump to solution

ok, once you get the debug i can see exactly what is going on, we can make the changes necessary to make it work.

0 Kudos
mtr
New Contributor

Re: Bad From header when sending to freeswitch

Jump to solution

markfreeman

i did

also i would remove this from T01, not needed

then add your domain to T01

voice trunk t01

no outbound-proxy primary sip.abc.cloud

domain sip.abc.cloud

the and the problem was solved

Anonymous
Not applicable

Re: Bad From header when sending to freeswitch

Jump to solution

Moshe,

Thanks for the update on your problem. Glad everything is working now!

-Mark